}
@Test
public void testSerializer() {
try {
AttributeModelSerializer serializer = new AttributeModelSerializer();
StringWriter stringWriter = new StringWriter();
XMLStreamWriter writer = createWriter(stringWriter);
serializer.writeModel(writer, model);
writer.close();
String s1 = stringWriter.toString();
System.out.println(s1);
IndexedAttributeModel model2 = new IndexedAttributeModel();
StringReader stringReader = new StringReader(s1);
XMLStreamReader reader = createReader(stringReader);
serializer.readModel(reader, model2);
stringWriter = new StringWriter();
writer = createWriter(stringWriter);
serializer.writeModel(writer, model2);
String s2 = stringWriter.toString();
System.out.println(s2);
assertEquals(s1, s2);
} catch (XMLStreamException ex) {
Exceptions.printStackTrace(ex);