# HG changeset patch # User Jaroslav Tulach # Date 1265153171 -3600 # Node ID 5653a70ebb569d1bde5883d4e08b321336c15e0d # Parent a2947558c9667f7c787f1474b068706416e100cc We need to use AbstractLookup because of a bug in Lookups.fixed when dealling with lookup by ID diff -r a2947558c966 -r 5653a70ebb56 spring.lookup/src/test/java/org/apidesign/spring/LookupBasedApplicationContextTest.java --- a/spring.lookup/src/test/java/org/apidesign/spring/LookupBasedApplicationContextTest.java Wed Feb 03 00:04:30 2010 +0100 +++ b/spring.lookup/src/test/java/org/apidesign/spring/LookupBasedApplicationContextTest.java Wed Feb 03 00:26:11 2010 +0100 @@ -52,6 +52,7 @@ import org.openide.util.lookup.AbstractLookup; import org.openide.util.lookup.AbstractLookup.Content; import org.openide.util.lookup.AbstractLookup.Pair; +import org.openide.util.lookup.InstanceContent; import org.openide.util.lookup.Lookups; import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.NoSuchBeanDefinitionException; @@ -165,7 +166,9 @@ } public void testCooperationWithAutowire() throws Exception { - Lookup base = Lookups.fixed(Long.valueOf(1000L)); + InstanceContent ic = new InstanceContent(); + Lookup base = new AbstractLookup(ic); + ic.add(Long.valueOf(1000L)); ApplicationContext baseCtx = SpringAndLookup.create(base, "base"); ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( new String[] {"cooperation-with-autowire.xml"},