### Question:
BitReaderBuffer { public int remainingBits() { return buffer.limit() * 8 - position; } BitReaderBuffer(ByteBuffer buffer); boolean readBool(); int readBits(int i); int getPosition(); int byteSync(); int remainingBits();  }### Answer:
@Test public void testRemainingBits() { BitReaderBuffer bitReaderBuffer = new BitReaderBuffer(testSequence); Assert.assertEquals(32, bitReaderBuffer.remainingBits()); int six = 6; bitReaderBuffer.readBits(six); Assert.assertEquals(32 - six, bitReaderBuffer.remainingBits()); }