### Question:
ByteUtils { public static void putLong(byte[] buffer, int offset, long l) { buffer[offset++] = (byte) (l >> 56); buffer[offset++] = (byte) (l >> 48); buffer[offset++] = (byte) (l >> 40); buffer[offset++] = (byte) (l >> 32); buffer[offset++] = (byte) (l >> 24); buffer[offset++] = (byte) (l >> 16); buffer[offset++] = (byte) (l >> 8); buffer[offset] = (byte) l; }  static void putLong(byte[] buffer, int offset, long l); static long getLong(byte[] buffer, int offset);  }### Answer:
@Test public void putLong() { byte[] array = new byte[8]; ByteBuffer buffer = ByteBuffer.wrap(array); ByteUtils.putLong(array, 0, 42); assertThat(buffer.getLong()).isEqualTo(42); }