test code for class