String tests for equals and hashcode