### Question:
DataTypesCodec { public static long readLengthCodedIntLE(final ByteBuf in) { int firstByte = in.readByte() & 0xFF; switch (firstByte) { case 251: return -1; case 252: return in.readUnsignedShortLE(); case 253: return in.readUnsignedMediumLE(); case 254: return in.readLongLE(); default: return firstByte; } }  static void skipBytes(final int length, final ByteBuf in); static void readNul(final ByteBuf in); static float readFloatLE(final ByteBuf in); static double readDoubleLE(final ByteBuf in); static BitSet readBitmap(final int length, final ByteBuf in); static byte readInt1(final ByteBuf in); static short readInt2LE(final ByteBuf in); static int readInt3LE(final ByteBuf in); static int readInt4LE(final ByteBuf in); static long readInt8LE(final ByteBuf in); static short readUnsignedInt1(final ByteBuf in); static int readUnsignedInt2BE(final ByteBuf in); static int readUnsignedInt2LE(final ByteBuf in); static int readUnsignedInt3BE(final ByteBuf in); static int readUnsignedInt3LE(final ByteBuf in); static long readUnsignedInt4BE(final ByteBuf in); static long readUnsignedInt4LE(final ByteBuf in); static long readUnsignedInt5BE(final ByteBuf in); static long readUnsignedInt6LE(final ByteBuf in); static BigInteger readUnsignedInt8LE(final ByteBuf in); static long readLengthCodedIntLE(final ByteBuf in); static byte[] readBytes(final int length, final ByteBuf in); static String readFixedLengthString(final int length, final ByteBuf in); static String readLengthCodedString(final ByteBuf in); static String readNulTerminatedString(final ByteBuf in); static void writeByte(final byte data, final ByteBuf out); static void writeInt5(final long data, final ByteBuf out); static void writeIntN(final int length, final long data, final ByteBuf out); static void writeInt2LE(final short data, final ByteBuf out); static void writeInt4LE(final int data, final ByteBuf out); static void writeIntNLE(final int length, final long data, final ByteBuf out); static void writeLengthCodedInt(final int data, final ByteBuf out); static void writeBytes(final byte[] data, final ByteBuf out); static void writeNulTerminatedString(final String data, final ByteBuf out); static void writeLengthCodedBinary(final byte[] data, final ByteBuf out);  }### Answer:
@Test public void assertReadLengthCodedIntLE() { when(byteBuf.readByte()).thenReturn((byte) 251); assertThat(DataTypesCodec.readLengthCodedIntLE(byteBuf), is(-1L)); when(byteBuf.readByte()).thenReturn((byte) 252); when(byteBuf.readUnsignedShortLE()).thenReturn(0x00010000); assertThat(DataTypesCodec.readLengthCodedIntLE(byteBuf), is(65536L)); when(byteBuf.readByte()).thenReturn((byte) 253); when(byteBuf.readUnsignedMediumLE()).thenReturn(0x01000000); assertThat(DataTypesCodec.readLengthCodedIntLE(byteBuf), is(16777216L)); when(byteBuf.readByte()).thenReturn((byte) 254); when(byteBuf.readLongLE()).thenReturn(1L + Integer.MAX_VALUE); assertThat(DataTypesCodec.readLengthCodedIntLE(byteBuf), is(1L + Integer.MAX_VALUE)); when(byteBuf.readByte()).thenReturn((byte) 10); assertThat(DataTypesCodec.readLengthCodedIntLE(byteBuf), is(10L)); }