### Question:
SelectorDoc { protected void appendClassTypeAttributes(StringBuffer stringBuffer, ClassType classType) { for (Attribute attribute : classType.getAttributes()) { stringBuffer.append(String.format(FEATURE, ATTRIBUTE, attribute.getName())); } } SelectorDoc(String inputXmiFilename, String outputXmlFilename); static void main(String[] args); static final String ATTRIBUTE; static final String ASSOCIATION; }### Answer:
@Test public void testAppendClassTypeAttributes() { this.selectorDoc.appendClassTypeAttributes(stringBuffer, CLASS_TYPE); String part1 = String.format(SelectorDoc.FEATURE, SelectorDoc.ATTRIBUTE, ATTRIBUTE1_NAME); String part2 = String.format(SelectorDoc.FEATURE, SelectorDoc.ATTRIBUTE, ATTRIBUTE2_NAME); String expectedToString = part1 + part2; assertEquals(expectedToString, stringBuffer.toString()); }