X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fkaraf%2FClearStatsCommandProviderTest.java;h=f6bd07f75eee0353feb73a11b3da276150fdd62e;hb=777c94332871b8c34f56f7f2010de1536cb759ba;hp=8b016e982a7272a7477c6c111bc222c34b6ba59d;hpb=7efd88b5573838da910ffbbab67f8e606b8d5709;p=openflowplugin.git diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ClearStatsCommandProviderTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ClearStatsCommandProviderTest.java index 8b016e982a..f6bd07f75e 100644 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ClearStatsCommandProviderTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ClearStatsCommandProviderTest.java @@ -8,12 +8,12 @@ package org.opendaylight.openflowplugin.impl.karaf; -import com.google.common.base.Function; -import javax.annotation.Nullable; +import static org.mockito.ArgumentMatchers.anyString; + +import java.util.function.Function; import org.junit.After; import org.junit.Assert; import org.junit.Test; -import org.mockito.Matchers; import org.mockito.Mockito; import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.MessageIntelligenceAgency; import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.MessageSpy; @@ -26,13 +26,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731 public class ClearStatsCommandProviderTest extends AbstractKarafTest { private ClearStatsCommandProvider clearStatsCommandProvider; - private static final Function CHECK_NO_ACTIVITY_FUNCTION = new Function() { - @Nullable - @Override - public Boolean apply(String input) { - return input.endsWith(": no activity detected"); - } - }; + private static final Function CHECK_NO_ACTIVITY_FUNCTION = + input -> input.endsWith(": no activity detected"); private MessageIntelligenceAgency mi5; @Override @@ -45,7 +40,7 @@ public class ClearStatsCommandProviderTest extends AbstractKarafTest { @After public void tearDown() { - Mockito.verify(console).print(Matchers.anyString()); + Mockito.verify(console).print(anyString()); mi5.resetStatistics(); }