Model model2 = createFgNodeTestModel2();
ReferenceGroundedDecomposition dec1 = new ReferenceGroundedDecompositionImpl(
JenaUtil.getGraphFromModel(model1, true));
ReferenceGroundedDecomposition dec2 = new ReferenceGroundedDecompositionImpl(
JenaUtil.getGraphFromModel(model2, true));
MoleculeDiff diff = new MoleculeDiffImpl(dec1, dec2);
diff.print(new PrintWriter(System.out, true));
assertEquals("cross-graph nodset", 1, diff.getCrossGraphFgNodes()
.size());
assertEquals("fgnodes only in 1", 0, diff.getFgNodesOnlyIn1().size());
assertEquals("fgnodes only in 2", 1, diff.getFgNodesOnlyIn2().size());
assertEquals("molecules only in 1", 1, diff
.getContextualMoleculesOnlyIn1().size());
assertEquals("terminal molecules only in 1", 1, diff
.getTerminalMoleculesOnlyIn1().size());
assertEquals("molecules only in 2", 1, diff
.getContextualMoleculesOnlyIn2().size());
assertEquals("molecules only in 2", 1, diff
.getTerminalMoleculesOnlyIn2().size());
}