public void testToByteArray() { assertByteArrayEquals( new byte[] {0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19}, Longs.toByteArray(0x1213141516171819L)); assertByteArrayEquals( new byte[] { (byte) 0xFF, (byte) 0xEE, (byte) 0xDD, (byte) 0xCC, (byte) 0xBB, (byte) 0xAA, (byte) 0x99, (byte) 0x88 }, Longs.toByteArray(0xFFEEDDCCBBAA9988L)); }
public void testToByteArray() { assertByteArrayEquals( new byte[] {0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19}, Longs.toByteArray(0x1213141516171819L)); assertByteArrayEquals( new byte[] { (byte) 0xFF, (byte) 0xEE, (byte) 0xDD, (byte) 0xCC, (byte) 0xBB, (byte) 0xAA, (byte) 0x99, (byte) 0x88}, Longs.toByteArray(0xFFEEDDCCBBAA9988L)); }