SomeResource2.class,
SomeResource4.class);
// set up mock ApplicationContext
BeanProvider ctx = EasyMock.createMock(BeanProvider.class);
EasyMock.expect(ctx.getBean(EasyMock.eq("dep1"))).andReturn(new SomeDependency1()).anyTimes();
Map<String, SomeDependency2> map2 = new HashMap<String, SomeDependency2>();
map2.put("someBeanName", new SomeDependency2());
EasyMock.expect(ctx.getBeansOfType(EasyMock.eq(SomeDependency2.class)))
.andReturn(map2).anyTimes();
Map<String, SomeDependency1> map1 = new HashMap<String, SomeDependency1>();
map1.put("someDep1", new SomeDependency1());
map1.put("anotherDep1", new SomeDependency1());
EasyMock.expect(ctx.getBeansOfType(EasyMock.eq(SomeDependency1.class)))
.andReturn(map1).anyTimes();
EasyMock.replay(ctx);