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));
lib = export.importFromStream(new FileInputStream(exported));
File reExported = new File(exported + "_out.xml");
export.exportToStream(lib, new FileOutputStream(reExported));
if (Arrays.equals(FileUtils.getBytesFromFile(exported), FileUtils.getBytesFromFile(reExported))) {
// they are equal, remove the exported plan
exported.delete();
reExported.delete();