@Test 
public void testMarshall() {

  try {
   DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
   DocumentBuilder db;
   db = dbf.newDocumentBuilder();
   
   Legend legend = new Legend();
   legend.setName("Legend");
   
   LegendLeaf leaf = new LegendLeaf();
   leaf.setName("Vegetation");
   
   LegendComposite root = new LegendComposite();
   root.setName("LegendRoot");
   root.addComponent(leaf);
   
   legend.setLegendRoot(root);
   // legend.marshall("target/test-classes/LegendUltraSimple2.xml");
   
   /*File xml1 = new File("target/test-classes/LegendUltraSimple2.xml");
   Document doc1 = db.parse(xml1);
   assertEquals(doc1.getDocumentElement().getChildNodes().getLength(), 3);
   
   File xml2 = new File("target/test-classes/LegendUltraSimple.xml");
   Document doc2 = db.parse(xml2);
   assertEquals(doc2.getDocumentElement().getChildNodes().getLength(), 5);*/
   
   // assertXMLEqual(doc1, doc2);
  
  } catch (Exception e) {
    e.printStackTrace();
  }
  
}