assertTrue(collection instanceof List);
assertFalse(collection instanceof ArrayList);
}
public void testComponentRegisteredWithInterfaceKeyOnlyImplementsThatInterfaceUsingCGLIBProxyfactory() {
DefaultPicoContainer pico = new DefaultPicoContainer(new HotSwappingComponentAdapterFactory(new ConstructorInjectionComponentAdapterFactory(), new CglibProxyFactory()));
pico.registerComponentImplementation(Collection.class, ArrayList.class);
Object collection = pico.getComponentInstance(Collection.class);
assertTrue(collection instanceof Collection);
assertFalse(collection instanceof List);
assertFalse(collection instanceof ArrayList);