Refactored the two test classes into one