DimensionFormatter implements Formatter { @Override public Element buildDimensionTag(int count) { Element dimensionTag = new Element("dimension"); dimensionTag.setAttribute("name", dimension.getName()); dimensionTag.setAttribute("label", dimension.getLabel()); return dimensionTag; } DimensionFormatter(Dimension dimension); @Override Element buildDimensionTag(int count); @Override Element buildCategoryTag(CategorySummary result);  }
@Test public void testBuildDimensionTag() throws JDOMException { Element dimensionTag = formatter.buildDimensionTag(6); assertEquals("dimension", dimensionTag.getName()); assertEquals(0, dimensionTag.getContent().size()); assertEquals(2, dimensionTag.getAttributes().size()); assertEquals("keyword", dimensionTag.getAttributeValue("name")); assertEquals("Keywords", dimensionTag.getAttributeValue("label")); }