@Test
public void shouldAcceptIntsAndBytes() throws IOException {

    OutputStreamBitChannel channel = new OutputStreamBitChannel(out);
    channel.write(12, (int) 0xfff, ByteOrder.BigEndian); // 1111 1111 1111
    channel.write(5, (byte) 0x0); // 0000 0
    verify(out).write((byte) Integer.parseInt("11111111", 2));
    verify(out).write((byte) Integer.parseInt("11110000", 2));
    verifyNoMoreInteractions(out);
}