@Test
public void testGetByteCounter() throws Exception {

  final JBBPOut out = BeginBin();
  assertEquals(0, out.getByteCounter());
  out.Bit(true);
  out.Bit(true);
  out.Bit(true);
  out.Bit(true);
  out.Bit(true);
  out.Bit(true);
  out.Bit(true);
  assertEquals(0, out.getByteCounter());
  out.Bit(true);
  assertEquals(1, out.getByteCounter());
  out.Bit(true);
  out.Byte(new byte[1234]);
  assertEquals(1235, out.getByteCounter());
  out.ResetCounter();
  assertEquals(0, out.getByteCounter());
  out.Bit(true);
  assertEquals(0, out.getByteCounter());
  out.End();
  assertEquals(1, out.getByteCounter());
}