InstanceConnectionInfo implements IOReadableWritable, Comparable<InstanceConnectionInfo>, java.io.Serializable { public String getFQDNHostname() { return this.fqdnHostName; } InstanceConnectionInfo(InetAddress inetAddress, int dataPort);  InstanceConnectionInfo(); int dataPort(); InetAddress address(); String getFQDNHostname(); String getHostname(); String getInetAdress(); @Override void read(DataInputView in); @Override void write(final DataOutputView out); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); @Override int compareTo(InstanceConnectionInfo o);  }
@Test public void testSerialization() { try { { InstanceConnectionInfo original = new InstanceConnectionInfo(InetAddress.getByName("1.2.3.4"), 8888); InstanceConnectionInfo copy = CommonTestUtils.createCopyWritable(original); assertEquals(original, copy); InstanceConnectionInfo serCopy = CommonTestUtils.createCopySerializable(original); assertEquals(original, serCopy); } { InstanceConnectionInfo original = new InstanceConnectionInfo(InetAddress.getByName("127.0.0.1"), 19871); original.getFQDNHostname(); InstanceConnectionInfo copy = CommonTestUtils.createCopyWritable(original); assertEquals(original, copy); InstanceConnectionInfo serCopy = CommonTestUtils.createCopySerializable(original); assertEquals(original, serCopy); } } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } }
@Test public void testGetFQDNHostname() { try { InstanceConnectionInfo info1 = new InstanceConnectionInfo(InetAddress.getByName("127.0.0.1"), 19871); assertNotNull(info1.getFQDNHostname()); InstanceConnectionInfo info2 = new InstanceConnectionInfo(InetAddress.getByName("1.2.3.4"), 8888); assertNotNull(info2.getFQDNHostname()); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } }