Moving cobra_test into package cobra for easier testing