X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=restconf%2Fsal-rest-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2Ftest%2FRestPostOperationTest.java;h=ca3fb86c748083d8840873901657ea769bcf097a;hb=d434f750405b4509121900b677a80402c077b422;hp=4983b7cac40295bf047fac39d91a65535dcf1be3;hpb=ddc71443d58ac78f8a593be88e181310f1e4b9c8;p=netconf.git diff --git a/restconf/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestPostOperationTest.java b/restconf/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestPostOperationTest.java index 4983b7cac4..ca3fb86c74 100644 --- a/restconf/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestPostOperationTest.java +++ b/restconf/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestPostOperationTest.java @@ -33,6 +33,7 @@ import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; import org.mockito.ArgumentCaptor; +import org.mockito.Mockito; import org.opendaylight.controller.md.sal.common.api.TransactionStatus; import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException; import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint; @@ -112,7 +113,7 @@ public class RestPostOperationTest extends JerseyTest { setSchemaControllerContext(schemaContextYangsIetf); when( brokerFacade.commitConfigurationDataPost(any(DOMMountPoint.class), any(YangInstanceIdentifier.class), - any(NormalizedNode.class))).thenReturn(mock(CheckedFuture.class)); + any(NormalizedNode.class), null, null)).thenReturn(mock(CheckedFuture.class)); final DOMMountPoint mountInstance = mock(DOMMountPoint.class); when(mountInstance.getSchemaContext()).thenReturn(schemaContextTestModule); @@ -137,7 +138,8 @@ public class RestPostOperationTest extends JerseyTest { final RpcResult rpcResult = new DummyRpcResult.Builder().result( TransactionStatus.COMMITED).build(); - when(brokerFacade.commitConfigurationDataPost((SchemaContext)null, any(YangInstanceIdentifier.class), any(NormalizedNode.class))) + when(brokerFacade.commitConfigurationDataPost((SchemaContext) null, any(YangInstanceIdentifier.class), + any(NormalizedNode.class), null, null)) .thenReturn(mock(CheckedFuture.class)); final ArgumentCaptor instanceIdCaptor = ArgumentCaptor.forClass(YangInstanceIdentifier.class); @@ -157,7 +159,8 @@ public class RestPostOperationTest extends JerseyTest { // FIXME : NEVER test a nr. of call some service in complex test suite // verify(brokerFacade, times(2)) verify(brokerFacade, times(1)) - .commitConfigurationDataPost((SchemaContext)null, instanceIdCaptor.capture(), compNodeCaptor.capture()); + .commitConfigurationDataPost((SchemaContext) null, instanceIdCaptor.capture(), compNodeCaptor.capture(), + null, null); // identifier = "[(urn:ietf:params:xml:ns:yang:test-interface?revision=2014-07-01)interfaces, (urn:ietf:params:xml:ns:yang:test-interface?revision=2014-07-01)block]"; assertEquals(identifier, ImmutableList.copyOf(instanceIdCaptor.getValue().getPathArguments()).toString()); } @@ -166,7 +169,8 @@ public class RestPostOperationTest extends JerseyTest { public void createConfigurationDataNullTest() throws UnsupportedEncodingException { initMocking(); - when(brokerFacade.commitConfigurationDataPost(any(SchemaContext.class), any(YangInstanceIdentifier.class),any(NormalizedNode.class))) + when(brokerFacade.commitConfigurationDataPost(any(SchemaContext.class), any(YangInstanceIdentifier.class), + any(NormalizedNode.class), Mockito.anyString(), Mockito.anyString())) .thenReturn(Futures.immediateCheckedFuture(null)); //FIXME : find who is set schemaContext