X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflow-protocol-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowjava%2Fprotocol%2Fimpl%2Futil%2FActionsSerializerTest.java;h=14f50d0be944fcf062df7d5baaca163855bb02d9;hb=6cd66ac6ecd35ddd17b9a489633a2443464e8581;hp=20d5e17969d2bf5bad318e4f03aecc19db6feb5b;hpb=b279e51164e2ad923a42e95333a3ca6187c2bc28;p=openflowjava.git diff --git a/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/ActionsSerializerTest.java b/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/ActionsSerializerTest.java index 20d5e179..14f50d0b 100644 --- a/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/ActionsSerializerTest.java +++ b/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/ActionsSerializerTest.java @@ -167,6 +167,7 @@ public class ActionsSerializerTest { actionBuilder.setType(Experimenter.class); ExperimenterActionBuilder experimenter = new ExperimenterActionBuilder(); experimenter.setExperimenter(4L); + experimenter.setData(new byte[]{0, 1, 2, 3, 4, 5, 6, 7}); actionBuilder.addAugmentation(ExperimenterAction.class, experimenter.build()); actions.add(actionBuilder.build()); @@ -234,8 +235,12 @@ public class ActionsSerializerTest { Assert.assertEquals("Wrong action length", 8, out.readUnsignedShort()); out.skipBytes(4); Assert.assertEquals("Wrong action type", 65535, out.readUnsignedShort()); - Assert.assertEquals("Wrong action length", 8, out.readUnsignedShort()); - Assert.assertEquals("Wrong action experimenter", 4, out.readUnsignedInt()); + Assert.assertEquals("Wrong action length", 16, out.readUnsignedShort()); + Assert.assertEquals("Wrong experimenter", 4, out.readUnsignedInt()); + byte[] data = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES]; + out.readBytes(data); + Assert.assertArrayEquals("Wrong data", new byte[]{0, 1, 2, 3, 4, 5, 6, 7}, data); + Assert.assertTrue("Unread data", out.readableBytes() == 0); } }