StripTagsTextFormatter implements ITextFormatter { @Override public String format(String text) { return text.replaceAll(pattern, ""); } StripTagsTextFormatter();  StripTagsTextFormatter(String pattern); @Override String format(String text);  }
@Test public void testFormat() throws Exception { ITextFormatter formatter = new StripTagsTextFormatter(); String result = formatter.format(testVerses); Assert.assertFalse(result.contains("<I>")); Assert.assertFalse(result.contains("</I>")); Assert.assertFalse(result.contains("<p>")); Assert.assertFalse(result.contains("</p>")); }