@Test public void testGenerateContent() throws Exception {

    DocumentContent dc = new StandardDocumentContent(TEST_CONTENT);
    GenericAttributeContent gac = new GenericAttributeContent("boringAttribute");
    List<Map<String, String>> attrs = gac.parseContent(dc.getAttributeContent());
    assertEquals(1, attrs.size());
    Map<String, String> properties = attrs.get(0);
    assertEquals(2, properties.size());
    assertEquals("green", properties.get("color"));
    assertEquals("circle", properties.get("shape"));
    String content = gac.generateContent(properties);
    assertEquals(content.replaceAll("\\s+", ""), ATTRIB1_CONTENT.replaceAll("\\s+", ""));
    gac = new GenericAttributeContent("coolAttribute");
    attrs = gac.parseContent(dc.getAttributeContent());
    assertEquals(1, attrs.size());
    properties = attrs.get(0);
    assertEquals(2, properties.size());
    assertEquals("hasselhof", properties.get("driver"));
    assertEquals("KIT", properties.get("car"));
    content = gac.generateContent(properties);
    // order is not guaranteed
    List<String> validValues = Arrays.asList(ATTRIB2_CONTENT.replaceAll("\\s+", ""), ATTRIB2_CONTENT_REVERSED.replaceAll(
            "\\s+", ""));
    content = content.replaceAll("\\s+", "");
    assertTrue(validValues.contains(content));
}