InterfaceRule implements Rule { @Override public Bundle getBundle() { return bundle; } InterfaceRule(Bundle b, String im); synchronized void addPropMatch(String name, String value); synchronized void addProperty(String name, String value, String type); @Override synchronized void apply(ServiceReference<?> sref, Map<String, Object> target); @Override Bundle getBundle();  }
@Test public void testInterfaceRuleGetBundle() { Bundle b = EasyMock.createMock(Bundle.class); EasyMock.replay(b); InterfaceRule ir = new InterfaceRule(b, "org.apache.Foo"); assertSame(b, ir.getBundle()); }