@Test
public void should_read_into_byte_array() throws IOException {

    StrictInputStream in = new StrictInputStream(new ByteArrayInputStream(new byte[]{1, 2, 3, 4}));
    assertArrayEquals(new byte[]{1, 2, 3}, in.readBytes(3));
    assertThatThrownBy(() -> in.readBytes(2)).isExactlyInstanceOf(EOFException.class);
}