public void test9() throws IOException {
Model m1 = ModelFactory.createDefaultModel();
Model m2 = ModelFactory.createDefaultModel();
m1.read(getClass().getResource("test9.nt").toString(), "N-TRIPLE");
m1 = LeanDiffPatch.leanify(m1);
MoleculeDiff diff = LeanDiffPatch.getDiff(m1, m2);
System.out.println(diff);
File file = File.createTempFile("test9-serial", ".zip");
diff.serialize(new FileOutputStream(file));
MoleculeDiff diffRec = diff;// LeanDiffPatch.deserializeDiff(new
// File("test7-serial.zip"));
System.out.println(diff.getCommonFgNodesInDiffMolecules().size());
System.out.println(diffRec.getCommonFgNodesInDiffMolecules().size());
Model m2reconstructed = LeanDiffPatch.patch(m1, diff);// diffRec);
// m2reconstructed.write(System.out);
System.out.println(LeanDiffPatch.getDiff(m2, m2reconstructed));
assertTrue("reconstructed is isomorphic", m2
.isIsomorphicWith(m2reconstructed));