eqClass.addFrom(A, gr.transitionMatrix.get(A).entrySet());
eqClass.mergeWith(B, gr.transitionMatrix.get(B).entrySet());
Assert.assertSame(A,eqClass.getRepresentative());Assert.assertEquals(10, eqClass.getNumber());
Set<StringVertexPair> expectedTargetsCurrent = new TreeSet<StringVertexPair>();
expectedTargetsCurrent.add(new StringVertexPair("a", B));expectedTargetsCurrent.add(new StringVertexPair("d", A));
Set<StringVertexPair> expectedTargetsNew = new TreeSet<StringVertexPair>();
expectedTargetsNew.add(new StringVertexPair("b", C));expectedTargetsNew.add(new StringVertexPair("a", D));
Set<StringVertexPair> expectedTargetsTotal = new TreeSet<StringVertexPair>();
expectedTargetsTotal.add(new StringVertexPair("a", B));
expectedTargetsTotal.add(new StringVertexPair("b", C));
expectedTargetsTotal.add(new StringVertexPair("a", D));
expectedTargetsTotal.add(new StringVertexPair("d", A));
Assert.assertEquals(expectedTargetsCurrent, eqClass.getOutgoing());
Assert.assertEquals(expectedTargetsNew, eqClass.getNewOutgoing());
eqClass.populate();
Assert.assertEquals(expectedTargetsTotal, eqClass.getOutgoing());
}