Revert "Checkstyle enforcer"
[controller.git] / opendaylight / sal / api / src / test / java / org / opendaylight / controller / sal / action / ActionTest.java
index eeddc0b9b0dc33df0424936535907ef651b13d4f..6858494283a2ec6cf0ee0e56e57d88d5a3ce5960 100644 (file)
@@ -35,8 +35,12 @@ import org.opendaylight.controller.sal.core.Node;
 import org.opendaylight.controller.sal.core.NodeConnector;
 import org.opendaylight.controller.sal.utils.EtherTypes;
 import org.opendaylight.controller.sal.utils.NodeConnectorCreator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ActionTest {
+    protected static final Logger logger = LoggerFactory
+    .getLogger(ActionTest.class);
     @Test
     public void tesActionCreationValidation() {
         Action action = new PopVlan();
@@ -140,7 +144,7 @@ public class ActionTest {
         try {
             ip = InetAddress.getByName("171.71.9.52");
         } catch (UnknownHostException e) {
-            e.printStackTrace();
+            logger.error("",e);
         }
 
         action = new SetNwSrc(ip);
@@ -152,7 +156,7 @@ public class ActionTest {
         try {
             ip = InetAddress.getByName("2001:420:281:1003:f2de:f1ff:fe71:728d");
         } catch (UnknownHostException e) {
-            e.printStackTrace();
+            logger.error("",e);
         }
         action = new SetNwSrc(ip);
         Assert.assertTrue(action.isValid());
@@ -163,9 +167,12 @@ public class ActionTest {
         action = new SetNwTos(0xf);
         Assert.assertTrue(action.isValid());
 
-        action = new SetNwTos(0xff);
+        action = new SetNwTos(0x3f);
         Assert.assertTrue(action.isValid());
 
+        action = new SetNwTos(0x40);
+        Assert.assertFalse(action.isValid());
+        
         action = new SetNwTos(0xff1);
         Assert.assertFalse(action.isValid());
 
@@ -219,7 +226,7 @@ public class ActionTest {
         try {
             ip = InetAddress.getByName("1.1.1.1");
         } catch (UnknownHostException e) {
-            e.printStackTrace();
+            logger.error("",e);
         }
 
         actions.add(new SetDlSrc(mac));