}
@Test
public void testFindLabelsPossibleFromSuperTypes() {
FusionEnvironment<?> env = new FusionEnvironment<TestAliasContext>(aliases, null, null, testH, new InferenceEnvironment(null), Variant.PRAGMATIC_VARIANT);
FreeVars fv = new FreeVars().addVar(new SpecVar("a"), "Foo").addVar(new SpecVar("b"), "Bar");
Substitution existing = new Substitution().addSub(new SpecVar("a"), labels[0]).addSub(new SpecVar("b"), labels[1]);
fv = fv.addVar(new SpecVar("c"), "Baz");
List<Substitution> subs = env.allValidSubs(existing, fv);
Iterator<Substitution> itr = subs.iterator();
assertTrue(itr.hasNext());
Substitution subA = itr.next();
assertTrue(itr.hasNext());
Substitution subB = itr.next();
assertTrue(itr.hasNext());
Substitution subC = itr.next();
assertTrue(itr.hasNext());
Substitution subD = itr.next();
assertTrue(!itr.hasNext());
assertEquals(3, subA.size());
assertEquals(3, subB.size());
assertEquals(3, subC.size());
assertEquals(3, subD.size());
List<ObjectLabel> possible = new LinkedList<ObjectLabel>();
possible.add(subA.getSub(new SpecVar("c")));
possible.add(subB.getSub(new SpecVar("c")));
possible.add(subC.getSub(new SpecVar("c")));
possible.add(subD.getSub(new SpecVar("c")));
assertTrue(possible.contains(labels[1]));
assertTrue(possible.contains(labels[2]));
assertTrue(possible.contains(labels[5]));
assertTrue(possible.contains(labels[6]));