HostAndPort implements DataSerializableFixedID { public String getHostName() { return socketInetAddress.getHostString(); } HostAndPort();  HostAndPort(String hostName, int port); InetSocketAddress getSocketInetAddress(); String getHostName(); int getPort(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); InetAddress getAddress(); @Override int getDSFID(); @Override void toData(DataOutput out, SerializationContext context); @Override void fromData(DataInput in, DeserializationContext context); @Override KnownVersion[] getSerializationVersions();  }
@Test public void getHostName_returns_hostname() { HostAndPort locator1 = new HostAndPort("fakelocalhost", 8091); assertThat(locator1.getHostName()).isEqualTo("fakelocalhost"); }