Migrate openflowplugim-impl tests to uint types
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / protocol / serialization / actions / SetTpDstActionSerializerTest.java
index 438e85c7410ef4329790ca66f414f5ed1031e852..22b924e4047065008647bd89b31967e2470f8391 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.protocol.serialization.actions;
 
 import static org.junit.Assert.assertEquals;
@@ -17,18 +16,18 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.acti
 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetTpDstActionCaseBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.tp.dst.action._case.SetTpDstActionBuilder;
 import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint8;
 
 public class SetTpDstActionSerializerTest extends AbstractSetFieldActionSerializerTest {
 
     @Test
     public void testSerialize() {
-        final PortNumber port = new PortNumber(20);
-        final short protocol = 6; // TCP
+        final PortNumber port = new PortNumber(Uint16.valueOf(20));
 
         final Action action = new SetTpDstActionCaseBuilder()
                 .setSetTpDstAction(new SetTpDstActionBuilder()
                         .setPort(port)
-                        .setIpProtocol(protocol)
+                        .setIpProtocol(Uint8.valueOf(6))
                         .build())
                 .build();