equals and hascode tests for hashmap