public void testTransformAB() {
Artifact target = new Artifact(new ArtifactIdentifier("a.java", 2, ""), null, null, a);
similarity.findTransformScript(target, contentB, -1).getEditSkript().transform(target);
assertEquals(contentB, target.getContent());
assertTrue("Markup mismatch (count): " + target.getMarkup().listMarkups().size(), target.getMarkup().listMarkups().size() == 2);
MarkupElement me = target.getMarkup().listAt(0).get(0);
assertTrue("Markup (orig) mismatch (start)", me.getStart() == 0);
assertTrue("Markup (orig) mismatch (end): " + me.getEnd() + "!=" + a.getContent().length(), me.getEnd() == a.getContent().length());
me = target.getMarkup().listMarkups(InsertedByEditScriptMarkup.class).get(0);
assertTrue("Markup type mismatch", me instanceof InsertedByEditScriptMarkup);
assertTrue("Markup (new) mismatch (start)", me.getStart() == a.getContent().length());
assertTrue("Markup (new) mismatch (end): " + me.getEnd() + "!=" + b.getContent().length(), me.getEnd() == b.getContent().length());
}