X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fnetconf-topology-singleton%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Ftopology%2Fsingleton%2Fimpl%2FNetconfNodeActorTest.java;h=694853e6f78b00ce5cc359d3f71549437a7bafb7;hb=4f0f6f3a97b17d1e6914149c4c999d8801596c41;hp=09415d9c67fcf16d0b03f0efdc14f9601a12fa92;hpb=e472058ffda7ab483a69d814761cfd6f026ec4ad;p=netconf.git diff --git a/netconf/netconf-topology-singleton/src/test/java/org/opendaylight/netconf/topology/singleton/impl/NetconfNodeActorTest.java b/netconf/netconf-topology-singleton/src/test/java/org/opendaylight/netconf/topology/singleton/impl/NetconfNodeActorTest.java index 09415d9c67..694853e6f7 100644 --- a/netconf/netconf-topology-singleton/src/test/java/org/opendaylight/netconf/topology/singleton/impl/NetconfNodeActorTest.java +++ b/netconf/netconf-topology-singleton/src/test/java/org/opendaylight/netconf/topology/singleton/impl/NetconfNodeActorTest.java @@ -12,9 +12,9 @@ import static java.nio.charset.StandardCharsets.UTF_8; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.argThat; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.argThat; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.after; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.doNothing; @@ -56,7 +56,6 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.mockito.ArgumentCaptor; -import org.mockito.ArgumentMatcher; import org.mockito.Mock; import org.opendaylight.controller.cluster.schema.provider.impl.YangTextSchemaSourceSerializationProxy; import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; @@ -189,7 +188,7 @@ public class NetconfNodeActorTest { @After public void teardown() { - TestKit.shutdownActorSystem(system, Boolean.TRUE); + TestKit.shutdownActorSystem(system, true); system = null; } @@ -543,7 +542,7 @@ public class NetconfNodeActorTest { return slaveRef; } - private void initializeMaster(List sourceIdentifiers) { + private void initializeMaster(final List sourceIdentifiers) { masterRef.tell(new CreateInitialMasterActorData(mockDOMDataBroker, sourceIdentifiers, mockDOMRpcService), testKit.getRef()); @@ -561,13 +560,7 @@ public class NetconfNodeActorTest { } private static PotentialSchemaSource withSourceId(final SourceIdentifier identifier) { - return argThat(new ArgumentMatcher>() { - @Override - public boolean matches(final Object argument) { - final PotentialSchemaSource potentialSchemaSource = (PotentialSchemaSource) argument; - return identifier.equals(potentialSchemaSource.getSourceIdentifier()); - } - }); + return argThat(argument -> identifier.equals(argument.getSourceIdentifier())); } private static String convertStreamToString(final InputStream is) {