@Test
public void testGetBufferedBitsNumber() throws Exception {

  final JBBPBitOutputStream out = new JBBPBitOutputStream(new ByteArrayOutputStream());
  out.writeBits(1, JBBPBitNumber.BITS_1);
  out.writeBits(3, JBBPBitNumber.BITS_2);
  assertEquals(3, out.getBufferedBitsNumber());
  assertEquals(0, out.getCounter());
}