X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fkaraf%2FResetEventTimesComandProviderTest.java;h=02315e81251c7ac77b638aa47a49bc90bcc0dd02;hb=777c94332871b8c34f56f7f2010de1536cb759ba;hp=cc19551ce8ffb15a8fbdc995bfc328a92fa949b4;hpb=9688b3b10ee4113753705f0080b29cd30e61a85d;p=openflowplugin.git diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ResetEventTimesComandProviderTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ResetEventTimesComandProviderTest.java index cc19551ce8..02315e8125 100644 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ResetEventTimesComandProviderTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ResetEventTimesComandProviderTest.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.EventIdentifier; import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.EventsTimeCounter; @@ -24,16 +24,9 @@ import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.EventsTimeCou public class ResetEventTimesComandProviderTest extends AbstractKarafTest { private ResetEventTimesComandProvider resetEventTimesComandProvider; - private static final Function CHECK_NO_ACTIVITY_FUNCTION = new Function() { - @Nullable - @Override - public Boolean apply(String input) { - return input.isEmpty(); - } - }; + private static final Function CHECK_NO_ACTIVITY_FUNCTION = String::isEmpty; @Override - public void doSetUp() { resetEventTimesComandProvider = new ResetEventTimesComandProvider(); EventsTimeCounter.resetAllCounters(); @@ -41,7 +34,7 @@ public class ResetEventTimesComandProviderTest extends AbstractKarafTest { @After public void tearDown() { - Mockito.verify(console).print(Matchers.anyString()); + Mockito.verify(console).print(anyString()); EventsTimeCounter.resetAllCounters(); }