@Override
    public int read(char[] cbuf, int off, int len) throws IOException {
        int read = in.read(cbuf, off, len);
        if (read > 0) {
            nonXmlCharFilterer.filter(cbuf, off, read);
        }
        return read;
    }
@Test
    public void testReadEOS() throws IOException {
        char[] buffer = new char[10];

        when(readerMock.read(any(char[].class), anyInt(), anyInt())).thenReturn(-1);

        int result = nonXmlFilterReader.read(buffer, 3, 5);

        assertEquals(-1, result, "Unexpected number of chars read");
        assertArrayEquals(new char[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, buffer, "Buffer should not have been affected");
    }