EasyMock.expect(systemBundle.adapt(BundleRevision.class)).andReturn(systemBundleRevision);
bundleContext.addBundleListener((BundleListener) EasyMock.anyObject());
bundleContext.addServiceListener((ServiceListener) EasyMock.anyObject());
EasyMock.expect(bundleContext.getBundles()).andReturn(new Bundle[] { systemBundle });
final Capture c = new Capture();
EasyMock.expect(bundleContext.createFilter((String) capture(c))).andAnswer(new IAnswer() {
public Object answer() throws Throwable {
return FilterImpl.newInstance((String) c.getValue());
}
}).anyTimes();
EasyMock.replay(new Object[] { bundleContext, systemBundle, systemBundleRevision });