import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
-import java.lang.reflect.Method;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
doNothing().when(schemaContextListener).onGlobalContextUpdated(schemaContext);
osgiService.registerSchemaContextListener(schemaContextListener);
- final Method schemaContextUpdate =
- OsgiBundleScanningSchemaService.class.getDeclaredMethod("updateContext", SchemaContext.class);
- schemaContextUpdate.setAccessible(true);
- schemaContextUpdate.invoke(osgiService, schemaContext);
+ osgiService.notifyListeners(schemaContext);
doReturn(schemaContextListener).when(bundleContext).getService(null);
assertEquals(schemaContextListener, osgiService.addingService(null));