public class HotSwappingComponentAdapterFactoryTestCase extends AbstractComponentAdapterFactoryTestCase {
private HotSwappingComponentAdapterFactory implementationHidingComponentAdapterFactory = new HotSwappingComponentAdapterFactory(new DefaultComponentAdapterFactory());
private CachingComponentAdapterFactory cachingComponentAdapterFactory = new CachingComponentAdapterFactory(implementationHidingComponentAdapterFactory);
public void testComponentRegisteredWithInterfaceKeyOnlyImplementsThatInterfaceUsingStandardProxyfactory() {
DefaultPicoContainer pico = new DefaultPicoContainer(new HotSwappingComponentAdapterFactory(new ConstructorInjectionComponentAdapterFactory()));
pico.registerComponentImplementation(Collection.class, ArrayList.class);
Object collection = pico.getComponentInstance(Collection.class);
assertTrue(collection instanceof Collection);
assertFalse(collection instanceof List);
assertFalse(collection instanceof ArrayList);