1 /* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
\r
2 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
\r
4 import io.netty.buffer.ByteBuf;
\r
6 import org.junit.Assert;
\r
7 import org.junit.Test;
\r
8 import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.BarrierReplyMessageFactory;
\r
9 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
\r
10 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.BarrierOutput;
\r
13 * @author michal.polkorab
\r
16 public class BarrierReplyMessageFactoryTest {
\r
19 * Testing of {@link BarrierReplyMessageFactory} for correct translation into POJO
\r
22 public void test() {
\r
23 ByteBuf bb = BufferHelper.buildBuffer(new byte[0]);
\r
24 BarrierOutput builtByFactory = BarrierReplyMessageFactory.getInstance().bufferToMessage(bb, HelloMessageFactoryTest.VERSION_YET_SUPPORTED);
\r
26 Assert.assertTrue(builtByFactory.getVersion() == HelloMessageFactoryTest.VERSION_YET_SUPPORTED);
\r
27 Assert.assertEquals(builtByFactory.getXid().longValue(), 16909060L);
\r