@Test
public void testWriteBit_ErrorForTooBigSize() throws Exception {

  assertThrows(IllegalArgumentException.class, () -> new JBBPBitOutputStream(new ByteArrayOutputStream()).writeBits(4, JBBPBitNumber.decode(9)));
}