OPNFLWPLUG-1032: Neon-MRI: Bump odlparent, yangtools, mdsal
[openflowplugin.git] / applications / notification-supplier / src / test / java / org / opendaylight / openflowplugin / applications / notification / supplier / impl / item / stat / QueueStatNotificationSupplierImplTest.java
index d19d879174e2694ad315054070483a154d58ef6a..6604b31c57c207470314308ffcafe94bea814f9b 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.openflowplugin.applications.notification.supplier.impl.
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -18,7 +19,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.Matchers;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
 import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
@@ -41,9 +41,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.
 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.flow.capable.node.connector.queue.statistics.FlowCapableNodeConnectorQueueStatisticsBuilder;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
-/**
- *
- */
 public class QueueStatNotificationSupplierImplTest {
 
     private static final String FLOW_NODE_ID = "openflow:111";
@@ -77,8 +74,8 @@ public class QueueStatNotificationSupplierImplTest {
 
     @Test
     public void testCreate() {
-        final QueueStatisticsUpdate notification = notifSupplierImpl.createNotification(createTestQueueStat(),
-                createTestQueueStatPath());
+        final QueueStatisticsUpdate notification = notifSupplierImpl
+                .createNotification(createTestQueueStat(), createTestQueueStatPath());
         assertNotNull(notification);
         assertEquals(FLOW_NODE_ID, notification.getId().getValue());
         assertEquals(FLOW_CODE_CONNECTOR_ID, notification.getNodeConnector().get(0).getId().getValue());
@@ -86,12 +83,12 @@ public class QueueStatNotificationSupplierImplTest {
 
     @Test
     public void testCreateChangeEvent() {
-        final TestData testData = new TestData(createTestQueueStatPath(),null,createTestQueueStat(),
-                DataObjectModification.ModificationType.WRITE);
+        final TestData testData = new TestData(createTestQueueStatPath(), null, createTestQueueStat(),
+                                               DataObjectModification.ModificationType.WRITE);
         Collection<DataTreeModification<FlowCapableNodeConnectorQueueStatisticsData>> collection = new ArrayList<>();
         collection.add(testData);
         notifSupplierImpl.onDataTreeChanged(collection);
-        verify(notifProviderService, times(1)).publish(Matchers.any(QueueStatisticsUpdate.class));
+        verify(notifProviderService, times(1)).publish(any(QueueStatisticsUpdate.class));
     }
 
     @Test(expected = IllegalArgumentException.class)
@@ -122,10 +119,11 @@ public class QueueStatNotificationSupplierImplTest {
     }
 
     private static FlowCapableNodeConnectorQueueStatisticsData createTestQueueStat() {
-        final FlowCapableNodeConnectorQueueStatisticsDataBuilder builder = new FlowCapableNodeConnectorQueueStatisticsDataBuilder();
-        final FlowCapableNodeConnectorQueueStatisticsBuilder value = new FlowCapableNodeConnectorQueueStatisticsBuilder();
+        final FlowCapableNodeConnectorQueueStatisticsDataBuilder builder
+                = new FlowCapableNodeConnectorQueueStatisticsDataBuilder();
+        final FlowCapableNodeConnectorQueueStatisticsBuilder value
+                = new FlowCapableNodeConnectorQueueStatisticsBuilder();
         builder.setFlowCapableNodeConnectorQueueStatistics(value.build());
         return builder.build();
     }
-}
-
+}
\ No newline at end of file