public void testWithExportTypes() throws Exception {
list.setExportTypes(supportedTypes);
List<String> service = new ArrayList<String>();
serviceRegistry.addService("mybean", "mymodule", new StaticServiceBeanReference(service), null, Collections.singletonMap("name", "value"), classLoader);
list.afterPropertiesSet();
assertTrue(list.isEmpty());
//add another service which does not specify export types
serviceRegistry.addService("mybean", "mymodule", new StaticServiceBeanReference(service), null, Collections.singletonMap("name", "value"), classLoader);
assertTrue(list.isEmpty());
//add another service which does specify export types
serviceRegistry.addService("mybean", "mymodule", new StaticServiceBeanReference(service), Arrays.asList(supportedTypes), Collections.singletonMap("name", "value"), classLoader);
assertFalse(list.isEmpty());
}