Bump MRI upstreams
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / karaf / ResetEventTimesComandProviderTest.java
index 3aedcd463baee3c2cdf54157e48582d9117282e8..02315e81251c7ac77b638aa47a49bc90bcc0dd02 100644 (file)
@@ -8,32 +8,25 @@
 
 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;
 
 /**
- * Test for {@link  ResetEventTimesComandProvider}
+ * Test for {@link  ResetEventTimesComandProvider}.
  */
 public class ResetEventTimesComandProviderTest extends AbstractKarafTest {
 
     private ResetEventTimesComandProvider resetEventTimesComandProvider;
-    private static final Function<String, Boolean> CHECK_NO_ACTIVITY_FUNCTION = new Function<String, Boolean>() {
-        @Nullable
-        @Override
-        public Boolean apply(String input) {
-            return input.isEmpty();
-        }
-    };
+    private static final Function<String, Boolean> CHECK_NO_ACTIVITY_FUNCTION = String::isEmpty;
 
     @Override
-
     public void doSetUp() {
         resetEventTimesComandProvider = new ResetEventTimesComandProvider();
         EventsTimeCounter.resetAllCounters();
@@ -41,14 +34,12 @@ public class ResetEventTimesComandProviderTest extends AbstractKarafTest {
 
     @After
     public void tearDown() {
-        Mockito.verify(console).print(Matchers.anyString());
+        Mockito.verify(console).print(anyString());
         EventsTimeCounter.resetAllCounters();
     }
 
     /**
-     * test for {@link ResetEventTimesComandProvider#doExecute()} when no stats were touched before
-     *
-     * @throws Exception
+     * Test for {@link ResetEventTimesComandProvider#doExecute()} when no stats were touched before.
      */
     @Test
     public void testDoExecute_clean() throws Exception {
@@ -58,9 +49,7 @@ public class ResetEventTimesComandProviderTest extends AbstractKarafTest {
     }
 
     /**
-     * test for {@link ResetEventTimesComandProvider#doExecute()} when stats were touched before
-     *
-     * @throws Exception
+     * Test for {@link ResetEventTimesComandProvider#doExecute()} when stats were touched before.
      */
     @Test
     public void testDoExecute_dirty() throws Exception {