Merge "Remove redundant type specifiers"
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / util / NodeConnectorRefToPortTranslatorTest.java
index 1afa39cb759e69f5958a44532e6207e30ac2d871..75b499dd5404e5d1a8dfcaea699ff96739b385ce 100644 (file)
@@ -10,12 +10,10 @@ package org.opendaylight.openflowplugin.impl.util;
 import com.google.common.collect.Lists;
 import java.math.BigInteger;
 import junit.framework.TestCase;
-import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.opendaylight.openflowplugin.api.OFConstants;
-import org.opendaylight.openflowplugin.openflow.md.util.OpenflowPortsUtil;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PacketInReason;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
@@ -29,19 +27,14 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.matc
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketIn;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketInMessageBuilder;
 
-/**
- * Created by Tomas Slusny on 24.3.2016.
- */
 @RunWith(MockitoJUnitRunner.class)
 public class NodeConnectorRefToPortTranslatorTest extends TestCase {
 
-    static final String PACKET_DATA = "Test_Data";
-    static final Long PORT_NO = 5l;
-    static final Long SECOND_PORT_NO = 6l;
-    static final BigInteger DATA_PATH_ID = BigInteger.TEN;
-    static final short OF_VERSION = OFConstants.OFP_VERSION_1_3;
-    static final String ID_VALUE = "openflow:" + DATA_PATH_ID;
-    static final Long TABLE_ID = 42L;
+    private static final String PACKET_DATA = "Test_Data";
+    private static final Long PORT_NO = 5L;
+    private static final BigInteger DATA_PATH_ID = BigInteger.TEN;
+    private static final short OF_VERSION = OFConstants.OFP_VERSION_1_3;
+    private static final Long TABLE_ID = 42L;
 
     private static PacketIn createPacketIn(long portNo) {
         InPortBuilder inPortBuilder = new InPortBuilder()
@@ -70,27 +63,6 @@ public class NodeConnectorRefToPortTranslatorTest extends TestCase {
                 .build();
     }
 
-    @Before
-    public void setUp() throws Exception {
-        // Initialize the OpenFlow version/port map
-        OpenflowPortsUtil.init();
-    }
-
-    @Test(expected = NullPointerException.class)
-    public void testForNotNullablePacketInInGetPortNo() throws Exception {
-        NodeConnectorRefToPortTranslator.getPortNoFromPacketIn(null);
-    }
-
-    @Test(expected = NullPointerException.class)
-    public void testForNotNullablePacketInInToNodeConnectorRef() throws Exception {
-        NodeConnectorRefToPortTranslator.toNodeConnectorRef(null, DATA_PATH_ID);
-    }
-
-    @Test(expected = NullPointerException.class)
-    public void testForNotNullableNodeConnectorRefInFromNodeConnectorRef() throws Exception {
-        NodeConnectorRefToPortTranslator.fromNodeConnectorRef(null, OF_VERSION);
-    }
-
     @Test
     public void testGetPortNoFromPacketIn() throws Exception {
         PacketIn packetIn = createPacketIn(PORT_NO);