OPNFLWPLUG-1032: Neon-MRI: Bump odlparent, yangtools, mdsal
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / translator / FlowRemovedTranslatorTest.java
index edcc1696750dd518518a653c066a41303950633d..fec15b653a420ebbeb5e329021c75e67c69ad07f 100644 (file)
@@ -40,7 +40,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
 
 /**
- * Test of {@link AggregatedFlowStatisticsTranslator}
+ * Test of {@link AggregatedFlowStatisticsTranslator}.
  */
 @RunWith(MockitoJUnitRunner.class)
 public class FlowRemovedTranslatorTest {
@@ -64,25 +64,22 @@ public class FlowRemovedTranslatorTest {
     @Mock
     private FlowWildcardsV10 flowWildcards;
 
-    private KeyedInstanceIdentifier<Node, NodeKey> nodeId;
-
     @Before
     public void setUp() throws Exception {
-        nodeId = InstanceIdentifier.create(Nodes.class)
+        final KeyedInstanceIdentifier<Node, NodeKey> nodeId = InstanceIdentifier.create(Nodes.class)
                 .child(Node.class, new NodeKey(new NodeId("dummyNodeId")));
 
         final ConvertorManager convertorManager = ConvertorManagerFactory.createDefaultManager();
         translator = new FlowRemovedTranslator(convertorManager);
         translatorV10 = new FlowRemovedV10Translator(convertorManager);
 
-        when(deviceContext.getDeviceState()).thenReturn(deviceState);
         when(deviceInfo.getNodeInstanceIdentifier()).thenReturn(nodeId);
-        when(features.getDatapathId()).thenReturn(BigInteger.TEN);
     }
 
     @Test
     public void testTranslate() throws Exception {
-        org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemoved flowRemovedMessage = buildMessage(false);
+        org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemoved flowRemovedMessage =
+                buildMessage(false);
         final FlowRemoved flowRemoved = translator.translate(flowRemovedMessage, deviceInfo, null);
 
         assertEquals(flowRemovedMessage.getCookie(), flowRemoved.getCookie().getValue());
@@ -92,7 +89,8 @@ public class FlowRemovedTranslatorTest {
 
     @Test
     public void testTranslateV10() throws Exception {
-        org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemoved flowRemovedMessage = buildMessage(true);
+        org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemoved flowRemovedMessage =
+                buildMessage(true);
         final FlowRemoved flowRemoved = translatorV10.translate(flowRemovedMessage, deviceInfo, null);
 
         assertEquals(flowRemovedMessage.getCookie(), flowRemoved.getCookie().getValue());
@@ -100,7 +98,8 @@ public class FlowRemovedTranslatorTest {
         assertEquals((short)0, flowRemoved.getTableId().shortValue());
     }
 
-    private org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemoved buildMessage(boolean isV10) {
+    private org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemoved
+            buildMessage(boolean isV10) {
         FlowRemovedMessageBuilder builder = new FlowRemovedMessageBuilder()
                 .setCookie(BigInteger.ONE)
                 .setReason(FlowRemovedReason.OFPRRGROUPDELETE)