### Question:
HServerInfo extends VersionedWritable implements WritableComparable<HServerInfo> { @Override public synchronized String toString() { return ServerName.getServerName(this.serverAddress.getHostnameAndPort(), this.startCode); } HServerInfo();  HServerInfo(final HServerAddress serverAddress, final int webuiport);  HServerInfo(HServerAddress serverAddress, long startCode,
      final int webuiport);  HServerInfo(HServerInfo other); byte getVersion(); synchronized HServerAddress getServerAddress(); synchronized long getStartCode(); int getInfoPort(); int getWebuiPort(); String getHostname(); @Override synchronized String toString(); @Override boolean equals(Object obj); @Override int hashCode(); void readFields(DataInput in); void write(DataOutput out); int compareTo(HServerInfo o);  }### Answer:
@Test public void testToString() { HServerAddress hsa1 = new HServerAddress("localhost", 1234); HServerInfo hsi1 = new HServerInfo(hsa1, 1L, 5678); System.out.println(hsi1.toString()); }