Stream stream = new Stream();
stream.write(1);
stream.writeBit(1);
byte[] sample = new byte[50];
assertEquals(0, stream.read(sample, 10, 0));
stream.skip(1);
assertEquals(0, stream.read(sample, 20, 0));
assertEquals(1, stream.readBit());
assertEquals(-1, stream.read(sample, 10, 0));
assertEquals(0, stream.getData().readable());
} finally {