added test for Purchase class