NodeAddress implements Comparable<NodeAddress>, Serializable { @Override public String toString() { return Byte.toUnsignedInt(addr[0]) + "." + Byte.toUnsignedInt(addr[1]); } NodeAddress(final int a);  NodeAddress(final byte[] a);  NodeAddress(final String a);  NodeAddress(final int addr0, final int addr1); @Override int compareTo(final NodeAddress other); @Override boolean equals(final Object obj); byte[] getArray(); byte getHigh(); byte getLow(); @Override int hashCode(); int intValue(); boolean isBroadcast(); Byte[] toByteArray(); @Override String toString(); static final NodeAddress BROADCAST_ADDR; }
@Test public void testToString() { NodeAddress instance = new NodeAddress("255.255"); String expResult = "255.255"; String result = instance.toString(); assertEquals(expResult, result); }