### Question:
EncodingHelper { public static void encodeLittleEndianFixedWidthLong(long l, byte[] array) { encodeLittleEndianFixedWidthLong(l, array, 0, array.length); } 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 testEncodeLittleEndianFixedWidthLong() throws Exception { byte[] arr = new byte[3]; EncodingHelper.encodeLittleEndianFixedWidthLong(1, arr); assertEquals(ByteBuffer.wrap(new byte[]{1, 0, 0}), ByteBuffer.wrap(arr)); EncodingHelper.encodeLittleEndianFixedWidthLong(-1, arr); assertEquals(ByteBuffer.wrap(new byte[]{-1, -1, -1}), ByteBuffer.wrap(arr)); EncodingHelper.encodeLittleEndianFixedWidthLong(0x001ff, arr); assertEquals(ByteBuffer.wrap(new byte[]{-1, 1, 0}), ByteBuffer.wrap(arr)); }