public class LibraryExportTest {
@Test
public void testExportImport() throws Exception{
LibraryTree lib = new LibraryTree();
lib.addMainRequirements();
lib.getRoot().setDescription("This is a description");
Leaf c = new Leaf();
c.setName("ImageWidth");
MeasurementInfo mInfo = new MeasurementInfo();
mInfo.fromUri("xcl://imageWidth#equal");
c.setMeasurementInfo(mInfo);
((LibraryRequirement)lib.getRoot().getChildren().get(0).getChildren().get(0)).addChild(c);
LibraryExport export = new LibraryExport();
File exported = new File ("test-data/lib_export.xml");
export.exportToStream(lib, new FileOutputStream(exported));