AsciiDocToXHtmlServiceImpl implements AsciiDocToXHtmlService { @Override public String convertAsciiDocToXHtml(final String asciiDoc) { LOG.info("Converting AsciiDoc to XHTML5..."); final Asciidoctor asciidoctor = create(); final Map<String, Object> attributes = AttributesBuilder.attributes() .unsetStyleSheet() .tableOfContents(Placement.TOP) .asMap(); final Map<String, Object> options = OptionsBuilder.options() .attributes(attributes) .backend("xhtml5") .asMap(); LOG.info("XHTML5 Conversion Complete!"); return asciidoctor.render(asciiDoc, options); }  @Override String convertAsciiDocToXHtml(final String asciiDoc);  }
@Test public void testAsciiDocToXHtmlConversion(){ final String asciiDoc = IOUtils.readFull( AsciiDocToXHtmlServiceImplTest.class.getResourceAsStream( "/swagger-petstore-asciidoc-example.adoc") ); final String xhtml = asciiDocToXHtmlService.convertAsciiDocToXHtml(asciiDoc); assertNotNull("XHtml Output Should Not Be Null!", xhtml); }