Ex. 4 - refactored the testing class