@Test
public void testReadCharArrayIntInt() throws IOException {

    Reader reader = new StringReader(source);
    CharToSpaceReader mapReader = new CharToSpaceReader(reader, chars);
    try {
        char[] read = new char[expected.length() * 2];
        int numRead = mapReader.read(read, 2, expected.length() + 2);
        assertEquals(expected.length(), numRead);
        for (int i = 2; i < expected.length(); i++) {
            assertEquals(expected.charAt(i - 2), read[i]);
        }
    } finally {
        mapReader.close();
    }
}