public void testIntersectionWith() {
ConcreteFunctionType fun = createFunction("fun");
ConcreteFunctionType fun2 = createFunction("fun2");
ConcreteType obj = fun.getInstanceType();
ConcreteType both = new ConcreteUnionType(fun, obj);
assertEquals(NONE, fun.intersectWith(obj));
assertEquals(NONE, obj.intersectWith(fun));
assertEquals(fun, both.intersectWith(fun));
assertEquals(fun, fun.intersectWith(both));
assertEquals(NONE, NONE.intersectWith(both));
assertEquals(NONE, both.intersectWith(NONE));
assertEquals(NONE, fun.intersectWith(NONE));
assertEquals(NONE, NONE.intersectWith(fun));
assertEquals(NONE, both.intersectWith(fun2));
assertEquals(both, ALL.intersectWith(both));
assertEquals(both, both.intersectWith(ALL));
assertEquals(fun, ALL.intersectWith(fun));
assertEquals(fun, fun.intersectWith(ALL));
assertEquals(NONE, ALL.intersectWith(NONE));
assertEquals(NONE, NONE.intersectWith(ALL));
}