@Test
public void testExampleFromHomepage_advancedExample_secondImprovement() throws Exception {

    // first improvement
    Modifier myModifier1 = new RegexModifier("edit\\sstream", Pattern.DOTALL, "modify stream");
    // test: does not preserve type of whitespace characters
    assertNotEquals("modify\tstream", modify("edit\tstream", myModifier1));
    // test: does not support many whitespace characters
    assertNotEquals("modify  stream", modify("edit  stream", myModifier1));
    // second improvement
    Modifier myModifier2 = new RegexModifier("edit(\\s++stream)", Pattern.DOTALL, "modify$1");
    // test: preserves type of whitespace characters
    assertEquals("modify\tstream", modify("edit\tstream", myModifier2));
    // test: supports many whitespace characters
    assertEquals("modify  stream", modify("edit  stream", myModifier2));
}