JsonMessageFormatter extends AbstractPluginableElement implements MessageFormatter { @Override public boolean formattingNeeded(String message) { return jsonFinder.findJsonFragments(message).size() > 0; } JsonMessageFormatter(); @Override int getApiVersion(); @Override boolean formattingNeeded(String message); @Override String format(String message); public JsonFinder jsonFinder; }
@Test(dataProvider = "formattingNeeded") public void testFormattingNeeded(String input,boolean expected, String message) throws Exception { Assert.assertEquals(underTest.formattingNeeded(input),expected,message); }