X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflow-protocol-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fopenflowjava%2Fprotocol%2Fimpl%2Fdeserialization%2Ffactories%2FMultipartReplyMessageFactoryTest.java;h=1920e07d897e7e5081a7adce0b703bbb184d366f;hb=d58ee5d9fb3dffc8bf395d2e29342dd5e16c9932;hp=24985bb8a87e5811945655f5b4a88cb6fea04623;hpb=c5a70b5ba23927a2797394393605e83316ba4061;p=openflowjava.git diff --git a/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartReplyMessageFactoryTest.java b/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartReplyMessageFactoryTest.java index 24985bb8..1920e07d 100644 --- a/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartReplyMessageFactoryTest.java +++ b/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartReplyMessageFactoryTest.java @@ -21,7 +21,6 @@ import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer; import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants; import org.opendaylight.openflowjava.protocol.impl.deserialization.DeserializerRegistryImpl; import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper; -import org.opendaylight.openflowjava.util.ByteBufUtils; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.EthertypeAction; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.GroupIdAction; @@ -125,31 +124,31 @@ public class MultipartReplyMessageFactoryTest { byte[] mfrDescBytes = new byte[256]; mfrDescBytes = mfrDesc.getBytes(); bb.writeBytes(mfrDescBytes); - ByteBufUtils.padBuffer((DESC_STR_LEN - mfrDescBytes.length), bb); + bb.writeZero(DESC_STR_LEN - mfrDescBytes.length); String hwDesc = "Hardware description"; byte[] hwDescBytes = new byte[256]; hwDescBytes = hwDesc.getBytes(); bb.writeBytes(hwDescBytes); - ByteBufUtils.padBuffer((DESC_STR_LEN - hwDescBytes.length), bb); + bb.writeZero(DESC_STR_LEN - hwDescBytes.length); String swDesc = "Software description"; byte[] swDescBytes = new byte[256]; swDescBytes = swDesc.getBytes(); bb.writeBytes(swDescBytes); - ByteBufUtils.padBuffer((DESC_STR_LEN - swDescBytes.length), bb); + bb.writeZero(DESC_STR_LEN - swDescBytes.length); String serialNum = "SN0123456789"; byte[] serialNumBytes = new byte[32]; serialNumBytes = serialNum.getBytes(); bb.writeBytes(serialNumBytes); - ByteBufUtils.padBuffer((SERIAL_NUM_LEN - serialNumBytes.length), bb); + bb.writeZero(SERIAL_NUM_LEN - serialNumBytes.length); String dpDesc = "switch3 in room 3120"; byte[] dpDescBytes = new byte[256]; dpDescBytes = dpDesc.getBytes(); bb.writeBytes(dpDescBytes); - ByteBufUtils.padBuffer((DESC_STR_LEN - dpDescBytes.length), bb); + bb.writeZero(DESC_STR_LEN - dpDescBytes.length); MultipartReplyMessage builtByFactory = BufferHelper.deserialize(multipartFactory, bb); @@ -827,7 +826,7 @@ public class MultipartReplyMessageFactoryTest { byte[] portNameBytes = new byte[MAX_PORT_NAME_LEN]; portNameBytes = portName.getBytes(); bb.writeBytes(portNameBytes); - ByteBufUtils.padBuffer((MAX_PORT_NAME_LEN - portNameBytes.length), bb); + bb.writeZero(MAX_PORT_NAME_LEN - portNameBytes.length); ByteBuf bb2 = BufferHelper.buildBuffer("00 00 00 41 " + //port config "00 00 00 05 " + //port state