ClassLoader thisLoader = ClassLoaderAdapterCollisionsTest.class.getClassLoader();
ClassLoader loader1 = registry.getAddon(AddonId.from("dep1", "1")).getClassLoader();
try
{
InterfaceWithGetterAndSetter local = new ClassImplementsInterfaceWithGetterAndSetter();
local.setPassthrough((InterfaceWithPassthroughMethod) loader1
.loadClass(ClassImplementsInterfaceWithPassthroughMethod.class.getName())
.newInstance());
Assert.fail("Should have received a " + ClassCastException.class.getName());
}