EventCodeParam { @Override public int hashCode() { int hashCode = 0; if (NullChecker.isNotNullish(eventCode)) { hashCode = eventCode.hashCode(); if (NullChecker.isNotNullish(eventCodeScheme)) { hashCode += eventCodeScheme.hashCode(); } } return hashCode; }  String getEventCode(); void setEventCode(String eventCode); String getEventCodeScheme(); void setEventCodeScheme(String eventCodeScheme); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testHashCode() { String eventCode = "event code"; EventCodeParam eventCodeParam = new EventCodeParam(); eventCodeParam.setEventCode(eventCode); assertEquals(eventCodeParam.hashCode(), eventCode.hashCode()); }