### Question:
AsciidoctorDemo { String generateHTMLFromString(final String input) { return asciidoctor.convert("Hello _Baeldung_!", new HashMap<String, Object>()); } AsciidoctorDemo(); void generatePDFFromString(final String input);  }### Answer:
@Test public void givenString_whenConverting_thenResultingHTMLCode() { final AsciidoctorDemo asciidoctorDemo = new AsciidoctorDemo(); Assert.assertEquals(asciidoctorDemo.generateHTMLFromString("Hello _Baeldung_!"), "<div class=\"paragraph\">\n<p>Hello <em>Baeldung</em>!</p>\n</div>"); }