1919d7876413e681681e09e7e4b29ce6ab179a0d
[openflowplugin.git] / openflow-codec / src / test / java / org / openflow / codec / protocol / OFPBarrierReplyTest.java
1 package org.openflow.codec.protocol;
2
3 import junit.framework.TestCase;
4
5 import org.openflow.codec.io.DataBuffers;
6 import org.openflow.codec.io.IDataBuffer;
7 import org.openflow.codec.protocol.OFPBarrierReply;
8 import org.openflow.codec.protocol.OFPType;
9 import org.openflow.codec.util.OFTestCase;
10
11 public class OFPBarrierReplyTest extends OFTestCase {
12     public void testWriteRead() throws Exception {
13         OFPBarrierReply msg = (OFPBarrierReply) messageFactory.getMessage(OFPType.BARRIER_REPLY);
14         IDataBuffer bb = DataBuffers.allocate(1024);
15         bb.clear();
16         msg.writeTo(bb);
17         bb.flip();
18         msg.readFrom(bb);
19         TestCase.assertEquals(OFPType.BARRIER_REPLY, msg.getType());
20     }
21 }