@Test
public void markdown() throws IOException {

  String text = "";
  text += "# Header 1\n";
  text += "* Item 1\n";
  text += "* Item 2\n";
  text += "* Item 3\n\n";
  text += "## Header 2\n";
  Handlebars handlebars = new Handlebars();
  handlebars.registerHelper("markdown", new MarkdownHelper());
  Template template = handlebars.compileInline("{{markdown .}}");
  String expected = "<h1>Header 1</h1>\n"
      + "<ul>\n"
      + "  <li>Item 1</li>\n"
      + "  <li>Item 2</li>\n"
      + "  <li>Item 3</li>\n"
      + "</ul>\n"
      + "<h2>Header 2</h2>";
  assertEquals(expected, template.apply(text));
}