X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fprotocol%2Fserialization%2Fmessages%2FGroupMessageSerializerTest.java;h=743ed2fb7b9d07d8f88b7233fa7c81f54944a73d;hb=08614b02699a03ff8604f3bf7531f0575134cf90;hp=f092579cdac1679b62571f0d5eb948de7a8ba56d;hpb=9688b3b10ee4113753705f0080b29cd30e61a85d;p=openflowplugin.git diff --git a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/GroupMessageSerializerTest.java b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/GroupMessageSerializerTest.java index f092579cda..743ed2fb7b 100644 --- a/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/GroupMessageSerializerTest.java +++ b/openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/serialization/messages/GroupMessageSerializerTest.java @@ -70,14 +70,14 @@ public class GroupMessageSerializerTest extends AbstractSerializerTest { .build()) .build()) .setOrder(ACTION_ORDER) - .setKey(ACTION_KEY) + .withKey(ACTION_KEY) .build() ); private static final Buckets BUCKETS = new BucketsBuilder() .setBucket(Collections.singletonList(new BucketBuilder() .setBucketId(BUCKET_ID) - .setKey(BUCKET_KEY) + .withKey(BUCKET_KEY) .setWatchGroup(BUCKET_WATCH_GROUP) .setWatchPort(BUCKET_WATCH_PORT) .setWeight(BUCKET_WEIGHT) @@ -106,7 +106,7 @@ public class GroupMessageSerializerTest extends AbstractSerializerTest { } @Test - public void testSerialize() throws Exception { + public void testSerialize() { final ByteBuf out = UnpooledByteBufAllocator.DEFAULT.buffer(); serializer.serialize(MESSAGE, out); @@ -131,14 +131,14 @@ public class GroupMessageSerializerTest extends AbstractSerializerTest { // Action assertEquals(out.readUnsignedShort(), ActionConstants.SET_FIELD_CODE); - assertEquals(out.readUnsignedShort(), EncodeConstants.SIZE_OF_SHORT_IN_BYTES // Size of action type - + EncodeConstants.SIZE_OF_SHORT_IN_BYTES // Size of action length - + EncodeConstants.SIZE_OF_SHORT_IN_BYTES // Match entry OXM class - + EncodeConstants.SIZE_OF_BYTE_IN_BYTES // Match entry field and mask - + EncodeConstants.SIZE_OF_BYTE_IN_BYTES // Match entry length + assertEquals(out.readUnsignedShort(), Short.BYTES // Size of action type + + Short.BYTES // Size of action length + + Short.BYTES // Match entry OXM class + + Byte.BYTES // Match entry field and mask + + Byte.BYTES // Match entry length + EncodeConstants.PADDING); // Size of set field (match entry) // Skip match entry header, we have tests for this elsewhere - out.skipBytes(EncodeConstants.SIZE_OF_INT_IN_BYTES); + out.skipBytes(Integer.BYTES); // Actual match body byte[] addressBytes = new byte[4];