### Question:
EncodingHelper { public static long decodeLittleEndianFixedWidthLong(ByteBuffer buffer) { return decodeLittleEndianFixedWidthLong(buffer.array(), buffer.arrayOffset() + buffer.position(), buffer.remaining()); } private  EncodingHelper(); static void encodeLittleEndianFixedWidthLong(long l, byte[] array); static void encodeLittleEndianFixedWidthLong(long value, byte[] array, int off, int len); static long decodeLittleEndianFixedWidthLong(ByteBuffer buffer); static long decodeLittleEndianFixedWidthLong(byte[] bytes, int off, int len); static int encodeLittleEndianVarInt(int n, byte[] buffer); static int decodeLittleEndianVarInt(ByteBuffer buffer); static final int MAX_VARINT_SIZE; }### Answer:
@Test public void testDecodeLittleEndianFixedWidthLong() throws Exception { byte[] arr = new byte[]{1, 0, 0}; assertEquals(1, EncodingHelper.decodeLittleEndianFixedWidthLong(ByteBuffer.wrap(arr))); arr = new byte[]{-1, -1, -1}; assertEquals(0xffffffL, EncodingHelper.decodeLittleEndianFixedWidthLong(ByteBuffer.wrap(arr))); arr = new byte[]{-1, 1, 0}; assertEquals(0x0001ff, EncodingHelper.decodeLittleEndianFixedWidthLong(ByteBuffer.wrap(arr))); }