### Question:
EndpointImpl extends AbstractAttributedInterceptorProvider implements Endpoint, Configurable { @Override public int hashCode() { return endpointInfo.hashCode(); } EndpointImpl(Bus bus, Service s, QName endpointName);  EndpointImpl(Bus bus, Service s, EndpointInfo ei); String getBeanName(); EndpointInfo getEndpointInfo(); Service getService(); Binding getBinding(); Executor getExecutor(); void setExecutor(Executor e); Bus getBus(); void setBus(Bus bus); MessageObserver getInFaultObserver(); MessageObserver getOutFaultObserver(); void setInFaultObserver(MessageObserver observer); void setOutFaultObserver(MessageObserver observer); void setProperties(Map<String, Object> properties); List<Feature> getActiveFeatures(); void initializeActiveFeatures(List<? extends Feature> features); @Override boolean equals(Object obj); @Override int hashCode(); synchronized void addCleanupHook(Closeable c); List<Closeable> getCleanupHooks();  }### Answer:
@Test public void testEqualsAndHashCode() throws Exception { Bus bus = new ExtensionManagerBus(); Service svc = new ServiceImpl(); EndpointInfo ei = new EndpointInfo(); ei.setAddress("http: EndpointInfo ei2 = new EndpointInfo(); ei2.setAddress("http: Endpoint ep = new EndpointImpl(bus, svc, ei); Endpoint ep1 = new EndpointImpl(bus, svc, ei); Endpoint ep2 = new EndpointImpl(bus, svc, ei2); int hashcode = ep.hashCode(); int hashcode1 = ep1.hashCode(); int hashcode2 = ep2.hashCode(); assertEquals("hashcodes must be equal", hashcode, hashcode1); assertNotEquals("hashcodes must not be equal", hashcode, hashcode2); assertNotEquals("two objects must not be equal", ep, ep1); assertNotEquals("two objects must not be equal", ep, ep2); ep.put("custom", Boolean.TRUE); assertEquals("hashcode must remain equal", hashcode, ep.hashCode()); }