FilteredServiceManager extends SimpleServiceManager { @Override protected boolean accept(final String serviceName) { return services.isEmpty() || services.contains(serviceName); } FilteredServiceManager(final String[] services); static void initServiceManager(final String[] services);  }
@Test public void checkJaxRs() { final FilteredServiceManager fsm = new FilteredServiceManager(new String[] { "jaxrs" }); assertTrue(fsm.accept("httpejbd")); assertTrue(fsm.accept("cxf-rs")); }
@Test public void checkJaxWs() { final FilteredServiceManager fsm = new FilteredServiceManager(new String[] { "jaxws" }); assertTrue(fsm.accept("httpejbd")); assertTrue(fsm.accept("cxf")); }
@Test public void checkEjbd() { final FilteredServiceManager fsm = new FilteredServiceManager(new String[] { "http" }); assertTrue(fsm.accept("httpejbd")); }
@Test public void checkDefault() { final FilteredServiceManager fsm = new FilteredServiceManager(new String[] { "foo" }); assertTrue(fsm.accept("foo")); }