added unit tests for hashcode function