### Question:
MacAddress { public long toLong() { long result = 0L; for (int i = 0; i < array.length; ++i) { result = (result << FULL_BYTE_SHIFT) + (array[i] & FULL_BYTE_MASK); } return result; } MacAddress(final long macAddress);  MacAddress(final byte[] macAddress);  MacAddress(final String macAddress); byte[] toByteArray(); long toLong(); @Override String toString(); String toHexString(); String toDecString(); String toBinString(); MacAddress to16BitMacAddress(); @Override boolean equals(final Object o); @Override int hashCode(); static final MacAddress HIGHEST_MAC_ADDRESS; static final MacAddress LOWEST_MAC_ADDRESS; }### Answer:
@Test public void fromStringToLong() { assertEquals(MAC_LONG, new MacAddress(MAC_DEC_STRING).toLong()); assertEquals(MAC_LONG, new MacAddress(MAC_HEX_STRING).toLong()); assertEquals(MAC_LONG, new MacAddress(MAC_BIN_STRING).toLong()); }
@Test public void fromLongToLong() { assertEquals(MAC_LONG, new MacAddress(MAC_LONG).toLong()); }
@Test public void fromByteArrayToLong() { assertEquals(MAC_LONG, new MacAddress(MAC_BYTES).toLong()); }