@Test
public void testExampleFromRegexModifierJavadoc_OwnMatchProcessor() throws Exception {

    String fakeErrorLog = "1 ERROR aa\n2 WARN bb\n3 ERROR cc";
    // choose the character stream to modify
    Reader originalReader = new StringReader( //
            fakeErrorLog);
    // select the modifier
    Modifier myModifier = new RegexModifier("^.*ERROR.*$", Pattern.MULTILINE, new MatchPrinter(), 0, 2048);
    // create the modifying reader that wraps the original reader
    Reader modifyingReader = new ModifyingReader(originalReader, myModifier);
    // use the modifying reader instead of the original reader
    String output = IOUtils.toString(modifyingReader);
    // stream content is not modified
    assertEquals(fakeErrorLog, output);
}