Enable modernizer in restconf-nb-bierman02
[netconf.git] / restconf / restconf-nb-bierman02 / src / test / java / org / opendaylight / netconf / sal / streams / listeners / NotificationListenerTest.java
index 29e61be1e6465597a0d09d3de21e048e55357b12..fef6c1f154ca23bf53b59302292a6a5534c1b426 100644 (file)
@@ -7,12 +7,12 @@
  */
 package org.opendaylight.netconf.sal.streams.listeners;
 
+import static java.util.Objects.requireNonNull;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
-import com.google.common.base.Preconditions;
 import com.google.common.collect.Lists;
 import java.io.FileNotFoundException;
 import java.net.URI;
@@ -234,7 +234,6 @@ public class NotificationListenerTest {
                 Notificator.createNotificationListener(paths, "stream-name", NotificationOutputType.JSON.toString(),
                         controllerContext);
         final NotificationListenerAdapter notifi = listNotifi.get(0);
-        final String result = notifi.prepareJson(schemaContext, notificationData);
-        return Preconditions.checkNotNull(result);
+        return requireNonNull(notifi.prepareJson(schemaContext, notificationData));
     }
 }