Cleanup use of deprecated constructs
[netconf.git] / restconf / restconf-nb-rfc8040 / src / test / java / org / opendaylight / restconf / nb / rfc8040 / rests / services / impl / JSONRestconfServiceRfc8040ImplTest.java
index c1c6f2cc8e4e58bdb211aa5fa72e40d130f76c29..48990d363b8eaf2741582fa03da50094eadbafaf 100644 (file)
@@ -8,10 +8,10 @@
 package org.opendaylight.restconf.nb.rfc8040.rests.services.impl;
 
 import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import static org.mockito.ArgumentMatchers.any;
@@ -192,7 +192,7 @@ public class JSONRestconfServiceRfc8040ImplTest {
         final TransactionChainHandler txChainHandler = new TransactionChainHandler(mockDOMDataBroker);
 
         final DOMMountPointServiceHandler mountPointServiceHandler =
-                DOMMountPointServiceHandler.newInstance(mockMountPointService);
+                new DOMMountPointServiceHandler(mockMountPointService);
 
         final DOMNotificationService mockNotificationService = mock(DOMNotificationService.class);
         final ServicesWrapper servicesWrapper = ServicesWrapper.newInstance(schemaContextHandler,
@@ -587,8 +587,7 @@ public class JSONRestconfServiceRfc8040ImplTest {
 
         doReturn(Optional.of(mockDOMDataBroker)).when(mockMountPoint).getService(DOMDataBroker.class);
 
-        doReturn(Optional.of(mockMountPoint))
-                .when(mockMountPointService).getMountPoint(notNull(YangInstanceIdentifier.class));
+        doReturn(Optional.of(mockMountPoint)).when(mockMountPointService).getMountPoint(notNull());
 
         return mockMountPoint;
     }