import io.netty.buffer.ByteBuf;
import io.netty.buffer.UnpooledByteBufAllocator;
-
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketOutInputBuilder;
/**
- * @author timotej.kubas
+ * Unit tests for PacketOutInputMessageFactory.
*
+ * @author timotej.kubas
*/
public class PacketOutInputMessageFactoryTest {
private static final byte MESSAGE_TYPE = 13;
private OFSerializer<PacketOutInput> packetOutFactory;
/**
- * Initializes serializer registry and stores correct factory in field
+ * Initializes serializer registry and stores correct factory in field.
*/
@Before
public void startUp() {
}
/**
- * Testing of {@link PacketOutInputMessageFactory} for correct translation from POJO
- * @throws Exception
+ * Testing of {@link PacketOutInputMessageFactory} for correct translation from POJO.
*/
@Test
public void testPacketOutInputMessage() throws Exception {
BufferHelper.setupHeader(builder, EncodeConstants.OF13_VERSION_ID);
builder.setBufferId(256L);
builder.setInPort(new PortNumber(256L));
- List<Action> actions = new ArrayList<>();
+ final List<Action> actions = new ArrayList<>();
ActionBuilder actionBuilder = new ActionBuilder();
PushVlanCaseBuilder pushVlanCaseBuilder = new PushVlanCaseBuilder();
PushVlanActionBuilder pushVlanBuilder = new PushVlanActionBuilder();
}
/**
- * Testing of {@link PacketOutInputMessageFactory} for correct translation from POJO
- * @throws Exception
+ * Testing of {@link PacketOutInputMessageFactory} for correct translation from POJO.
*/
@Test
public void testPacketOutInputWithNoData() throws Exception {
out.skipBytes(16); // skip packet out message to data index
Assert.assertTrue("Unexpected data", out.readableBytes() == 0);
}
-}
\ No newline at end of file
+}