/** Special case of fsmdiff */
@Test
public void testFsmDiff1a()
{
Configuration config = Configuration.getDefaultConfiguration().copy();config.setGdFailOnDuplicateNames(false);
LearnerGraphND grA = new LearnerGraphND(config);
OtpErlangObject grAerlang = ErlangLabel.parseText("{statemachine,['P1000','P1002','N1000'],"+
"[{'P1000',a,'P1000'},"+
" {'P1000',b,'P1002'},"+
" {'P1000',c,'N1000'},"+
" {'P1002',c,'P1002'},"+
" {'P1002',d,'P1002'}],"+
"'P1000',"+
"[d,b,c,a]}");
Synapse.StatechumProcess.parseStatemachine(grAerlang,grA,null,true);
Assert.assertTrue(grA.getInit().isAccept());
Assert.assertFalse(grA.findVertex("N1000").isAccept());
grA.findVertex("N1000").setAccept(true);
LearnerGraphND grB = new LearnerGraphND(config);
Synapse.StatechumProcess.parseStatemachine(ErlangLabel.parseText("{statemachine,['P1000','P1001','N1000'],"+
"[{'P1000',a,'P1001'},"+
"{'P1000',c,'P1001'},"+
"{'P1001',a,'N1000'},"+
"{'P1001',b,'P1000'},"+
"{'P1001',d,'P1001'}],"+
"'P1000',"+
"[d,b,c,a]}"),grB,null,true);
Assert.assertTrue(grB.getInit().isAccept());
Assert.assertFalse(grB.findVertex("N1000").isAccept());
grB.findVertex("N1000").setAccept(true);
OtpErlangObject difference = DifferenceVisualiser.ChangesToGraph.computeGD(grA, grB, config);
Assert.assertEquals("{'statemachinedifference',[{'P1003','a','P1001'},"+
"{'P1003','c','P1001'},"+
"{'P1001','a','P1000'},"+
"{'P1001','b','P1003'},"+
"{'P1001','d','P1001'}],"+
"[{'P1000','a','P1000'},"+
"{'P1000','b','P1002'},"+
"{'P1000','c','N1000'},"+
"{'P1002','c','P1002'},"+
"{'P1002','d','P1002'}],"+
"['P1003','P1001'],"+
"['N1000','P1002'],"+
"[{'P1000','N1000'},{'P1003','P1000'}],"+
"'P1003'}" , ErlangLabel.dumpErlangObject(difference));
LearnerGraphND shouldBeLikePrevious = new LearnerGraphND(grA,config);
DifferenceVisualiser.ChangesToGraph.load(difference).applyDiff(shouldBeLikePrevious, config);
DifferentFSMException ex = WMethod.checkM(grB, shouldBeLikePrevious);
Assert.assertNull(ex);Assert.assertEquals(shouldBeLikePrevious.getStateNumber(),grB.getStateNumber());
DirectedSparseGraph gr = DifferenceVisualiser.ChangesToGraph.computeVisualisationParameters(grAerlang, difference);
Map<String,String> edgeToColours = new TreeMap<String,String>();
for(Object edgeObj:gr.getEdges())
{