BeansConfig config = new BeansConfig(beansProject, "src/org/springframework/beans/factory/annotation/testMethodInjectionWithMapAndMultipleMatchesButOnlyOneAutowireCandidate-context.xml", IBeansConfig.Type.MANUAL);
Map<String, Integer[]> allowedRefs = new HashMap<String, Integer[]>();
allowedRefs.put("testBean2", new Integer[] { 423 });
AutowireDependencyProvider provider = new AutowireDependencyProvider(config, config);
Map<IBean, Set<IBeanReference>> references = provider.resolveAutowiredDependencies();
IBean bean = BeansModelUtils.getBean("annotatedBean", config);
assertEquals(1, references.size());
assertTrue(references.containsKey(bean));