assertEquals("Bazar", vars2.getType(new SpecVar("bazar")));
}
@Test
public void testUnionUnequal() throws FusionException {
FreeVars vars1 = new FreeVars();
vars1 = vars1.addVar(new SpecVar("foo"), "SnaFu");
vars1 = vars1.addVar(new SpecVar("bar"), "Bazar");
FreeVars vars2 = new FreeVars();
vars2 = vars2.addVar(new SpecVar("foo"), "Bazar");
vars2 = vars2.addVar(new SpecVar("bar"), "Snafu");
vars2 = vars2.union(vars1);
assertEquals(2, vars2.size());
assertEquals(FreeVars.OBJECT_TYPE, vars2.getType(new SpecVar("foo")));
assertEquals(FreeVars.OBJECT_TYPE, vars2.getType(new SpecVar("bar")));
}