ResidueNumber implements Serializable, Comparable<ResidueNumber> { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((chainId == null) ? 0 : chainId.hashCode()); result = prime * result + ((insCode == null) ? 0 : insCode.hashCode()); result = prime * result + ((seqNum == null) ? 0 : seqNum.hashCode()); return result; } ResidueNumber();  ResidueNumber(String chainId, Integer residueNumber, Character insCode); String getChainId(); void setChainId(String chainId); Character getInsCode(); void setInsCode(Character insCode); Integer getSeqNum(); void setSeqNum(Integer seqNum); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); String toPDB(); static ResidueNumber fromString(String pdb_code); int compareTo(ResidueNumber other); String printFull();  }
@Test public void testHashCode() { ResidueNumber instance = new ResidueNumber("A", 42, ' '); int expResult = 93290; int result = instance.hashCode(); assertEquals(expResult, result); }