X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=mdsal.git;a=blobdiff_plain;f=dom%2Fmdsal-dom-broker%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fmdsal%2Fdom%2Fbroker%2Fosgi%2FOsgiBundleScanningSchemaServiceTest.java;h=46f689cdc00264079ec9d4e760896930dba22abd;hp=a90cf1404292c23eb12a8dd3ea1ef344b060ae70;hb=98bc46847cda68e350c3d498e2bd718f7f82cafa;hpb=c2c61de266b41416a11f381d3dba79d5866d7e76 diff --git a/dom/mdsal-dom-broker/src/test/java/org/opendaylight/mdsal/dom/broker/osgi/OsgiBundleScanningSchemaServiceTest.java b/dom/mdsal-dom-broker/src/test/java/org/opendaylight/mdsal/dom/broker/osgi/OsgiBundleScanningSchemaServiceTest.java index a90cf14042..46f689cdc0 100644 --- a/dom/mdsal-dom-broker/src/test/java/org/opendaylight/mdsal/dom/broker/osgi/OsgiBundleScanningSchemaServiceTest.java +++ b/dom/mdsal-dom-broker/src/test/java/org/opendaylight/mdsal/dom/broker/osgi/OsgiBundleScanningSchemaServiceTest.java @@ -16,7 +16,6 @@ import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; -import java.lang.reflect.Method; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -66,10 +65,7 @@ public class OsgiBundleScanningSchemaServiceTest { 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); osgiService.registerSchemaContextListener(schemaContextListener); assertNull(osgiService.getSchemaContext());