### Question:
JBBPBitOutputStream extends FilterOutputStream implements JBBPCountableBitStream { @Override public int getBitBuffer() { return this.bitBuffer; } JBBPBitOutputStream(final OutputStream out);  JBBPBitOutputStream(final OutputStream out, final JBBPBitOrder order); @Override JBBPBitOrder getBitOrder(); void writeShort(final int value, final JBBPByteOrder byteOrder); void writeInt(final int value, final JBBPByteOrder byteOrder); void writeFloat(final float value, final JBBPByteOrder byteOrder); void writeLong(final long value, final JBBPByteOrder byteOrder); void writeDouble(final double value, final JBBPByteOrder byteOrder); @Override long getCounter(); @Override int getBitBuffer(); @Override int getBufferedBitsNumber(); @Override void flush(); @SuppressWarnings("NullableProblems") @Override void write(final byte[] b, final int off, final int len); @SuppressWarnings("NullableProblems") @Override void write(final byte[] b); void writeBits(final int value, final JBBPBitNumber bitNumber); void align(final long alignByteNumber); @Override void close(); @Override void write(final int value); void writeBytes(final byte[] array, final int length, final JBBPByteOrder byteOrder); @Override void resetCounter(); void writeString(final String value, final JBBPByteOrder order); void writeStringArray(final String[] value, final JBBPByteOrder order);  }### Answer:
@Test public void testGetBitBuffer() throws Exception { final JBBPBitOutputStream out = new JBBPBitOutputStream(new ByteArrayOutputStream()); out.writeBits(1, JBBPBitNumber.BITS_1); out.writeBits(3, JBBPBitNumber.BITS_2); assertEquals(7, out.getBitBuffer()); assertEquals(0, out.getCounter()); }