Added equals and hashcode methods to testcase