### Question:
HandlerId { @Override public int hashCode() { return Objects. hashCode( this.className,this.systemHashCode,this.container); } private  HandlerId(String className, int systemHashCode, boolean container); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void testHashCodeForEqualResourceHandlerId() throws Exception { HandlerId id1 = resourceHandlerId(); HandlerId id2 = resourceHandlerId(); assertThat(id1.hashCode(),equalTo(id2.hashCode())); assertThat(id2.hashCode(),equalTo(id1.hashCode())); }
@Test public void testHashCodeForEqualContainerHandlerId() throws Exception { HandlerId id1 = containerHandlerId(); HandlerId id2 = containerHandlerId(); assertThat(id1.hashCode(),equalTo(id2.hashCode())); assertThat(id2.hashCode(),equalTo(id1.hashCode())); }
@Test public void testHashCodeForDifferentHandlerIds() throws Exception { HandlerId id1 = resourceHandlerId(); HandlerId id2 = containerHandlerId(); assertThat(id1.hashCode(),not(equalTo(id2.hashCode()))); assertThat(id2.hashCode(),not(equalTo(id1.hashCode()))); }