}
@Test
public void testDhnsSerializer() {
try {
DHNSSerializer dHNSSerializer = new DHNSSerializer();
StringWriter stringWriter = new StringWriter();
dHNSSerializer.writeDhns(createWriter(stringWriter), dhns2);
String s1 = stringWriter.toString();
ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
Workspace workspace3 = pc.newWorkspace(pc.getCurrentProject());
pc.openWorkspace(workspace3);
Lookup.getDefault().lookup(AttributeController.class).getModel();
Dhns d2 = new Dhns(new DhnsGraphController(), workspace3);
StringReader stringReader = new StringReader(s1);
dHNSSerializer.readDhns(createReader(stringReader), d2);
stringWriter = new StringWriter();
dHNSSerializer.writeDhns(createWriter(stringWriter), d2);
String s2 = stringWriter.toString();
assertEquals(s1, s2);
} catch (XMLStreamException ex) {
Exceptions.printStackTrace(ex);
}