expect(admin.listRepositories()).andReturn(new org.apache.felix.bundlerepository.Repository[0]);
expect(admin.resolver(EasyMock.<org.apache.felix.bundlerepository.Repository[]>anyObject())).andReturn(resolver);
resolver.add(EasyMock.capture(captureReq));
expect(resolver.resolve(Resolver.NO_OPTIONAL_RESOURCES)).andReturn(true);
expect(resolver.getRequiredResources()).andReturn(new Resource[] { resource });
expect(resolver.getReason(resource)).andAnswer(new IAnswer() {
public Object answer() throws Throwable {
return new Reason[] { new ReasonImpl( resource, captureReq.getValue()) };
}
});
expect(resource.getURI()).andReturn("foo:bar");