package org.opendaylight.openflowjava.protocol.impl.serialization.factories;
-import org.junit.Assert;
-
import io.netty.buffer.ByteBuf;
import io.netty.buffer.UnpooledByteBufAllocator;
-
+import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.openflowjava.protocol.api.extensibility.OFSerializer;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.EchoReplyInputBuilder;
/**
- * @author michal.polkorab
+ * Unit tests for EchoReplyInputMessageFactory.
*
+ * @author michal.polkorab
*/
public class EchoReplyInputMessageFactoryTest {
private OFSerializer<EchoReplyInput> echoFactory;
/**
- * 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 EchoReplyInputMessageFactory} for correct translation from POJO
- * @throws Exception
+ * Testing of {@link EchoReplyInputMessageFactory} for correct translation from POJO.
*/
@Test
public void testV13() throws Exception {
}
/**
- * Testing of {@link EchoReplyInputMessageFactory} for correct translation from POJO
- * @throws Exception
+ * Testing of {@link EchoReplyInputMessageFactory} for correct translation from POJO.
*/
@Test
public void testV10() throws Exception {
}
/**
- * Testing of {@link EchoReplyInputMessageFactory} for correct message serialization
- * @throws Exception
+ * Testing of {@link EchoReplyInputMessageFactory} for correct message serialization.
*/
@Test
public void testDataSerialize()throws Exception {
EchoReplyInput eri = erib.build();
ByteBuf out = UnpooledByteBufAllocator.DEFAULT.buffer();
echoFactory.serialize(eri, out);
- BufferHelper.checkHeaderV13(out, ECHO_REPLY_MESSAGE_CODE_TYPE, 8+dataToTest.length);
+ BufferHelper.checkHeaderV13(out, ECHO_REPLY_MESSAGE_CODE_TYPE, 8 + dataToTest.length);
byte[] outData = new byte[dataToTest.length];
out.readBytes(outData);
Assert.assertArrayEquals("Wrong - different output data.",dataToTest, outData);