    @Test
    public void testNotFoundMultiBytes() throws IOException {

        char[] buffer = new char[5];
        Reader data = new StringReader("aabbccdd");
        PatternDetectingReader in = new PatternDetectingReader(data, "abc");
        assertEquals(3, in.read(buffer, 1, 3));
        assertEquals(3, in.read(buffer, 1, 3));
        assertEquals(2, in.read(buffer, 1, 3));
        assertEquals(-1, in.read(buffer, 1, 3));
        assertThrows(IOException.class, in::close);
    }