Unit testing for task 1 question 2

plus convert to class