@Test
public void shouldAcceptPartialBytes() throws IOException {

    OutputStreamBitChannel channel = new OutputStreamBitChannel(out);
    channel.write(4, (byte) 0xff); // 1111
    channel.write(4, (byte) 0x00); // 0000
    verify(out).write((byte) 0xf0);
    verifyNoMoreInteractions(out);
}