1 package org.openflow.protocol;
3 import java.nio.ByteBuffer;
5 import junit.framework.TestCase;
7 import org.openflow.util.OFTestCase;
9 public class OFPortConfigTest extends OFTestCase {
10 public void testWriteRead() throws Exception {
11 OFPortMod msg = (OFPortMod) messageFactory
12 .getMessage(OFType.PORT_MOD);
13 msg.setHardwareAddress(new byte[6]);
15 ByteBuffer bb = ByteBuffer.allocate(1024);
20 TestCase.assertEquals(OFType.PORT_MOD, msg.getType());
21 TestCase.assertEquals(1, msg.getPortNumber());