Added equals, hashcode to fix failing test