MacroModule { public void appendIndexLine(final XMLUtil util, final Appendable appendable) throws IOException { appendable.append("<library:element"); util.appendAttribute(appendable, "library:name", this.name); appendable.append("/>"); } MacroModule(final String name, final String language, final CharSequence code); static MacroModule createBasic(final String name, final CharSequence code); void add(final XMLUtil util, final OdsDocument document, final String libraryNameSlash); void appendIndexLine(final XMLUtil util, final Appendable appendable);  }
@Test public void testIndexLine() throws IOException { final MacroModule module = new MacroModule("n", "l", "module content"); final StringBuilder sb = new StringBuilder(); module.appendIndexLine(XMLUtil.create(), sb); DomTester.assertEquals("<library:element library:name=\"n\"/>", sb.toString()); }