Update MRI upstreams for Phosphorus
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / protocol / serialization / multipart / tablefeatures / InstructionsMissTablePropertySerializerTest.java
index 85a30671a8fc9ae3805aa8384edb5759e6be3dda..f25b6cfe6a20e80a0227fb58335f681c62001da2 100644 (file)
@@ -5,14 +5,11 @@
  * 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.multipart.tablefeatures;
 
 import static org.junit.Assert.assertEquals;
 
-import java.util.Collections;
 import org.junit.Test;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.InstructionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionBuilder;
@@ -20,26 +17,25 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.TableFeaturePropType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.InstructionsMiss;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.feature.prop.type.table.feature.prop.type.InstructionsMissBuilder;
+import org.opendaylight.yangtools.yang.binding.util.BindingMap;
 
 public class InstructionsMissTablePropertySerializerTest extends AbstractTablePropertySerializerTest {
-
     @Test
-    public void testSerialize() throws Exception {
+    public void testSerialize() {
         final InstructionsMiss property = new InstructionsMissBuilder()
                 .setInstructionsMiss(new org.opendaylight.yang.gen.v1.urn.opendaylight
                         .table.types.rev131026.table.feature.prop.type.table.feature.prop.type.instructions.miss
                         .InstructionsMissBuilder()
-                        .setInstruction(Collections.singletonList(new InstructionBuilder()
+                        .setInstruction(BindingMap.of(new InstructionBuilder()
                                 .setOrder(0)
-                                .setInstruction(new ApplyActionsCaseBuilder()
-                                        .build())
+                                .setInstruction(new ApplyActionsCaseBuilder().build())
                                 .build()))
                         .build())
                 .build();
 
         assertProperty(property, out -> {
             assertEquals(out.readUnsignedShort(), InstructionConstants.APPLY_ACTIONS_TYPE);
-            out.skipBytes(EncodeConstants.SIZE_OF_SHORT_IN_BYTES); // Skip length of set field action
+            out.skipBytes(Short.BYTES); // Skip length of set field action
         });
     }
 
@@ -52,5 +48,4 @@ public class InstructionsMissTablePropertySerializerTest extends AbstractTablePr
     protected int getType() {
         return TableFeaturesPropType.OFPTFPTINSTRUCTIONSMISS.getIntValue();
     }
-
 }