DiffInstruction instruction = getDiffInstruction();
DiffOperation diffOperation = new DiffOperation(new ExampleSerializerFactory(), instruction);
/// perform the diff report
DiffReport diffReport = diffOperation.performDiff(fromStateEngine, toStateEngine);
/// this score can be used as a quick overview to see the magnitude of the differences between the data states
System.out.println("Total Differences Between Matched Objects: " + diffReport.getTotalDiffs());
/// this score can be used as a quick overview to see the number of unmatched objects between the data states
System.out.println("Total Unmatched Objects: " + diffReport.getTotalExtra());
/// get the differences for a single type
TypeDiff<A> typeDiff = diffReport.getTypeDiff("A");
/// iterate through all fields for that type
for(FieldDiff<A> fieldDiff : typeDiff.getSortedFieldDifferencesDescending()) {
String propertyName = fieldDiff.getPropertyPath().toString();
int totalExamples = fieldDiff.getDiffScore().getTotalCount();