add a class-based unit test, found bug in eq function as a result: