### Question:
Endpoint implements Copiable<Endpoint>, Serializable { @Override public Endpoint copy() { return new Endpoint(this.ip, this.port); } Endpoint();  Endpoint(String address, int port); String getIp(); int getPort(); @Override String toString(); @Override Endpoint copy(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testCopy() { final Endpoint ep = new Endpoint("192.168.1.1", 8080); assertEquals("192.168.1.1:8080", ep.toString()); assertEquals("192.168.1.1:8080", ep.toString()); assertEquals(ep, ep.copy()); }