@Test
public void readBytes() throws IOException {

    test(new CB() {
        public void run(boolean close) throws IOException {
            BAIS bais = new BAIS(bytes);
            assertArrayEquals(bytes, StreamUtil.readBytes(bais, close).toByteArray());
            bais.assertClosed(close);
        }
    });
}