NodeAddress implements Comparable<NodeAddress>, Serializable { public int intValue() { return mergeBytes(addr[0], 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 testIntValue() { NodeAddress instance = new NodeAddress("255.255"); int expResult = Short.MAX_VALUE * 2 + 1; int result = instance.intValue(); assertEquals(expResult, result); }