AbstractMarkdownMacroRunnable implements IMacroRunnable { @Override public final String getHtml(IMacroContext macroContext) { String markdown = getMarkdown(macroContext); if (StringUtils.isNotBlank(markdown)) { HtmlSerializerContext context = macroContext.getHtmlSerializerContext(); return context.markdownToHtml(markdown); } return null; }  @Override final String getHtml(IMacroContext macroContext); @Override final String cleanupHtml(String html);  }
@Test public void getHtml() { when(htmlSerializerContext.markdownToHtml("markdown")).thenReturn("html"); AbstractMarkdownMacroRunnable runnable = new AbstractMarkdownMacroRunnable() { @Override String getMarkdown(IMacroContext macroContext) { return "markdown"; } }; assertEquals("html", runnable.getHtml(context)); }