@Test public void linksWithCustomDescriptorAttributes() throws IOException { TemplateResourceResolver resolver = mock(TemplateResourceResolver.class); given(resolver.resolveTemplateResource("links")) .willReturn(snippetResource("links-with-extra-column")); new LinksSnippet( new StubLinkExtractor().withLinks(new Link("a", "alpha"), new Link("b", "bravo")), Arrays.asList( new LinkDescriptor("a").description("one") .attributes(key("foo").value("alpha")), new LinkDescriptor("b").description("two") .attributes(key("foo").value("bravo")))) .document(this.operationBuilder.attribute( TemplateEngine.class.getName(), new MustacheTemplateEngine(resolver)) .build()); assertThat(this.generatedSnippets.links()) .is(tableWithHeader("Relation", "Description", "Foo") .row("a", "one", "alpha").row("b", "two", "bravo")); }