NodeAddress implements Comparable<NodeAddress>, Serializable { @Override public int compareTo(final NodeAddress other) { return Integer.valueOf(intValue()).compareTo(other.intValue()); } 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 testCompareTo() { NodeAddress other = new NodeAddress("1.1"); NodeAddress instance = new NodeAddress("1.1"); int expResult = 0; int result = instance.compareTo(other); assertEquals(expResult, result); }