@Test
public void testWriteByte() throws Exception {

  final ByteArrayOutputStream outBiuffer = new ByteArrayOutputStream();
  final JBBPBitOutputStream out = new JBBPBitOutputStream(outBiuffer);
  assertEquals(0, out.getCounter());
  out.write(0x12);
  assertEquals(1, out.getCounter());
  out.flush();
  assertEquals(1, out.getCounter());
  assertArrayEquals(new byte[] {0x12}, outBiuffer.toByteArray());
}