DocsGenerator { public Documentation documentationFrom(final URI relationType, final Class<?> controller) { Docs docs = findAnnotation(controller, Docs.class); if (docs != null) { for (final Doc relDoc : docs.value()) { if (!relDoc.rel().isEmpty() && absoluteUriOf(relDoc.rel()).equals(relationType)) { return documentationFrom(relDoc); } } } else { Doc relDoc = findAnnotation(controller, Doc.class); if (relDoc != null && !relDoc.rel().isEmpty() && absoluteUriOf(relDoc.rel()).equals(relationType)) { return documentationFrom(relDoc); } } return emptyDocs(); } DocsGenerator(final URI relationTypeBaseUri, final String docRootDir); Documentation documentationFrom(final URI relationType, final Class<?> controller); Documentation documentationFor(final ParameterInfo parameterInfo);  }
@Test public void docsGeneratorWithRelativeRootShouldWorkToo() { final DocsGenerator docsGenerator = new DocsGenerator(create("http: final Documentation documentation = docsGenerator.documentationFrom( create("http: ControllerWithMinimalMarkdownInclude.class ); assertEquals(documentation.getDescription(), emptyList()); assertEquals(documentation.getDetailedDescription(), "<h1>Hello World!</h1>"); }