-/*\r
- * Copyright (c) 2014 Pantheon Technologies s.r.o. and others. All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-\r
-package org.opendaylight.openflowjava.protocol.impl.deserialization.factories.multipart;\r
-\r
-import io.netty.buffer.ByteBuf;\r
-\r
-import org.junit.Assert;\r
-import org.junit.Test;\r
-import org.junit.runner.RunWith;\r
-import org.mockito.Matchers;\r
-import org.mockito.Mock;\r
-import org.mockito.Mockito;\r
-import org.mockito.runners.MockitoJUnitRunner;\r
-import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;\r
-import org.opendaylight.openflowjava.protocol.api.extensibility.MessageCodeKey;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartReplyMessageFactory;\r
-import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessage;\r
-\r
-/**\r
- * @author michal.polkorab\r
- *\r
- */\r
-@RunWith(MockitoJUnitRunner.class)\r
-public class MultipartReplyExperimenterTest {\r
-\r
- @Mock DeserializerRegistry registry;\r
-\r
- private MultipartReplyMessageFactory factory = new MultipartReplyMessageFactory();\r
-\r
- /**\r
- * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO\r
- */\r
- @Test\r
- public void testMultipartReplyExperimenter() {\r
- factory.injectDeserializerRegistry(registry);\r
- ByteBuf bb = BufferHelper.buildBuffer("FF FF 00 01 00 00 00 00 "\r
- + "00 00 00 01 00 00 00 02"); // expID, expType\r
- MultipartReplyMessage builtByFactory = BufferHelper.deserialize(factory, bb);\r
-\r
- BufferHelper.checkHeaderV13(builtByFactory);\r
- Assert.assertEquals("Wrong type", 65535, builtByFactory.getType().getIntValue());\r
- Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());\r
-\r
- Mockito.verify(registry, Mockito.times(1)).getDeserializer(Matchers.any(MessageCodeKey.class));\r
- }\r
+/*
+ * Copyright (c) 2014 Pantheon Technologies s.r.o. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.openflowjava.protocol.impl.deserialization.factories.multipart;
+
+import io.netty.buffer.ByteBuf;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Matchers;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
+import org.opendaylight.openflowjava.protocol.api.extensibility.MessageCodeKey;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.factories.MultipartReplyMessageFactory;
+import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessage;
+
+/**
+ * @author michal.polkorab
+ *
+ */
+@RunWith(MockitoJUnitRunner.class)
+public class MultipartReplyExperimenterTest {
+
+ @Mock DeserializerRegistry registry;
+
+ private MultipartReplyMessageFactory factory = new MultipartReplyMessageFactory();
+
+ /**
+ * Testing {@link MultipartReplyMessageFactory} for correct translation into POJO
+ */
+ @Test
+ public void testMultipartReplyExperimenter() {
+ factory.injectDeserializerRegistry(registry);
+ ByteBuf bb = BufferHelper.buildBuffer("FF FF 00 01 00 00 00 00 "
+ + "00 00 00 01 00 00 00 02"); // expID, expType
+ MultipartReplyMessage builtByFactory = BufferHelper.deserialize(factory, bb);
+
+ BufferHelper.checkHeaderV13(builtByFactory);
+ Assert.assertEquals("Wrong type", 65535, builtByFactory.getType().getIntValue());
+ Assert.assertEquals("Wrong flag", true, builtByFactory.getFlags().isOFPMPFREQMORE());
+
+ Mockito.verify(registry, Mockito.times(1)).getDeserializer(Matchers.any(MessageCodeKey.class));
+ }
}
\ No newline at end of file