{
Configuration config = Configuration.getDefaultConfiguration().copy();
LearnerGraph gr=new LearnerGraph(TestFSMAlgo.buildGraph("A-a->B\nA-b->B1\nA-c->C\nQ-a->R\nQ-b->Q-c->S", "testCountMatchingOutgoing3d"), config);
gr.linear.moveRejectToHighlight();
GDLearnerGraph ndGraph = new GDLearnerGraph(gr,LearnerGraphND.ignoreRejectStates, false);
DetermineDiagonalAndRightHandSide matcher = new GDLearnerGraph.DDRH_default();
getMatcherValue(gr,ndGraph.matrixForward, matcher,"A","Q");
// A and Q have 3 outgoing and 3 matched.
// the score for the first pair is -1, for the other ones it is 1, hence the outcome is 1
Assert.assertEquals(3,matcher.getRightHandSide());
Assert.assertEquals(3*2,matcher.getDiagonal());
}