public NFTypeSerializer<?>[] createSerializers() {
return new NFTypeSerializer<?>[] { new ASerializer() };
}
};
DiffHtmlGenerator htmlGenerator = new DiffHtmlGenerator(factory);
GenericObjectSerializationFramework framework = new GenericObjectSerializationFramework(factory);
GenericObject obj1 = framework.serialize(a1, "TypeA");
GenericObject obj2 = framework.serialize(a2, "TypeA");
String diffHtml = htmlGenerator.generateDiff(obj1, obj2);
/// 4, 5, 6 pair should be matched most closely and come first:
int indexOf456Pair = diffHtml.indexOf("val1: 4");
/// 1, 2, 3 and 1, 92, 3 should be matched second closest and come after
int indexOf123Pair = diffHtml.indexOf("val1: 1");