### Question:
TaskManagerLocation implements Comparable<TaskManagerLocation>, java.io.Serializable { public String getFQDNHostname() { return fqdnHostName; } TaskManagerLocation(ResourceID resourceID, InetAddress inetAddress, int dataPort); ResourceID getResourceID(); int dataPort(); InetAddress address(); String addressString(); String getFQDNHostname(); String getHostname(); static String getHostName(InetAddress inetAddress); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); @Override int compareTo(@Nonnull TaskManagerLocation o);  }### Answer:
@Test public void testSerialization() { try { { TaskManagerLocation original = new TaskManagerLocation( ResourceID.generate(), InetAddress.getByName("1.2.3.4"), 8888); TaskManagerLocation serCopy = InstantiationUtil.clone(original); assertEquals(original, serCopy); } { TaskManagerLocation original = new TaskManagerLocation( ResourceID.generate(), InetAddress.getByName("127.0.0.1"), 19871); original.getFQDNHostname(); TaskManagerLocation serCopy = InstantiationUtil.clone(original); assertEquals(original, serCopy); } } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } }
@Test public void testGetFQDNHostname() { try { TaskManagerLocation info1 = new TaskManagerLocation(ResourceID.generate(), InetAddress.getByName("127.0.0.1"), 19871); assertNotNull(info1.getFQDNHostname()); TaskManagerLocation info2 = new TaskManagerLocation(ResourceID.generate(), InetAddress.getByName("1.2.3.4"), 8888); assertNotNull(info2.getFQDNHostname()); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } }