Copyright update
[openflowjava.git] / openflow-protocol-impl / src / test / java / org / opendaylight / openflowjava / protocol / impl / deserialization / factories / FeaturesReplyMessageFactoryTest.java
index bf2bc82fbcac7c5a4e086f2fdcfdb66148715080..be6dc48c98468a9f0f1e7b2231f23b149e442b3f 100644 (file)
@@ -1,36 +1,43 @@
-/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */\r
-package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;\r
-\r
-import io.netty.buffer.ByteBuf;\r
-\r
-import org.junit.Assert;\r
-import org.junit.Test;\r
-import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.Capabilities;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutput;\r
-\r
-/**\r
- * @author michal.polkorab\r
- * @author timotej.kubas\r
- */\r
-public class FeaturesReplyMessageFactoryTest {\r
-\r
-    /**\r
-     * Testing {@link FeaturesReplyMessageFactory} for correct translation into POJO\r
-     */\r
-    @Test\r
-    public void test() {\r
-        ByteBuf bb = BufferHelper.buildBuffer("00 01 02 03 04 05 06 07 00 01 02 03 01 01 00 00 00"\r
-                + " 00 01 41 00 01 02 03");\r
-        GetFeaturesOutput builtByFactory = BufferHelper.decodeV13(\r
-                FeaturesReplyMessageFactory.getInstance(), bb);\r
-\r
-        BufferHelper.checkHeaderV13(builtByFactory);\r
-        Assert.assertEquals("Wrong datapathId", 0x0001020304050607L, builtByFactory.getDatapathId().longValue());\r
-        Assert.assertEquals("Wrong buffers", 0x00010203L, builtByFactory.getBuffers().longValue());\r
-        Assert.assertEquals("Wrong number of tables", 0x01, builtByFactory.getTables().shortValue());\r
-        Assert.assertEquals("Wrong auxiliaryId", 0x01, builtByFactory.getAuxiliaryId().shortValue());\r
-        Assert.assertEquals("Wrong capabilities", new Capabilities(true, false, false, true, false, true, false), builtByFactory.getCapabilities());\r
-        Assert.assertEquals("Wrong reserved", 0x00010203L, builtByFactory.getReserved().longValue());\r
-    }\r
-}\r
+/*
+ * Copyright (c) 2013 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;
+
+import io.netty.buffer.ByteBuf;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.Capabilities;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutput;
+
+/**
+ * @author michal.polkorab
+ * @author timotej.kubas
+ */
+public class FeaturesReplyMessageFactoryTest {
+
+    /**
+     * Testing {@link FeaturesReplyMessageFactory} for correct translation into POJO
+     */
+    @Test
+    public void test() {
+        ByteBuf bb = BufferHelper.buildBuffer("00 01 02 03 04 05 06 07 00 01 02 03 01 01 00 00 00"
+                + " 00 01 41 00 01 02 03");
+        GetFeaturesOutput builtByFactory = BufferHelper.decodeV13(
+                FeaturesReplyMessageFactory.getInstance(), bb);
+
+        BufferHelper.checkHeaderV13(builtByFactory);
+        Assert.assertEquals("Wrong datapathId", 0x0001020304050607L, builtByFactory.getDatapathId().longValue());
+        Assert.assertEquals("Wrong buffers", 0x00010203L, builtByFactory.getBuffers().longValue());
+        Assert.assertEquals("Wrong number of tables", 0x01, builtByFactory.getTables().shortValue());
+        Assert.assertEquals("Wrong auxiliaryId", 0x01, builtByFactory.getAuxiliaryId().shortValue());
+        Assert.assertEquals("Wrong capabilities", new Capabilities(true, false, false, true, false, true, false), builtByFactory.getCapabilities());
+        Assert.assertEquals("Wrong reserved", 0x00010203L, builtByFactory.getReserved().longValue());
+    }
+}