Migrate openflowplugim-impl tests to uint types
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / protocol / serialization / actions / SetVlanIdActionSerializerTest.java
index c90c554f606c0750642a67bac00f5099a5d8e6c1..fc6425dea49545b44124b4e430216a730b8eab73 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;
@@ -16,20 +15,17 @@ 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.SetVlanIdActionCaseBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.vlan.id.action._case.SetVlanIdActionBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId;
+import org.opendaylight.yangtools.yang.common.Uint16;
 
 public class SetVlanIdActionSerializerTest extends AbstractSetFieldActionSerializerTest {
 
     @Test
     public void testSerialize() {
-        final int vlan = 1;
-
         final Action action = new SetVlanIdActionCaseBuilder()
-                .setSetVlanIdAction(new SetVlanIdActionBuilder()
-                        .setVlanId(new VlanId(vlan))
-                        .build())
+                .setSetVlanIdAction(new SetVlanIdActionBuilder().setVlanId(new VlanId(Uint16.ONE)).build())
                 .build();
 
-        assertAction(action, out -> assertEquals(out.readShort(), vlan | (1 << 12)));
+        assertAction(action, out -> assertEquals(out.readShort(), 1 | 1 << 12));
     }
 
     @Override