Fix fileEncoding violations for checkstyle
[groupbasedpolicy.git] / renderers / iovisor / src / test / java / org / opendaylight / groupbasedpolicy / renderer / iovisor / sf / ParamDerivatorTest.java
index 5884bb471b6e60202f03d5d77fd2b907da53c9c5..1ef61583ba5980674571fdab3301be5be790c2ad 100755 (executable)
@@ -1,56 +1,56 @@
-/*\r
- * Copyright (c) 2016 Cisco Systems, Inc. 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.groupbasedpolicy.renderer.iovisor.sf;\r
-\r
-import static org.junit.Assert.assertEquals;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import org.junit.Test;\r
-import org.opendaylight.groupbasedpolicy.api.sf.EtherTypeClassifierDefinition;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.subject.feature.instance.ParameterValue;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.subject.feature.instance.ParameterValueBuilder;\r
-\r
-public class ParamDerivatorTest {\r
-\r
-    private ParamDerivator derivator = ParamDerivator.ETHER_TYPE_DERIVATOR;\r
-\r
-    @Test\r
-    public void testDeriveParameter_noDerivation() {\r
-        Map<String, ParameterValue> params = new HashMap<>();\r
-        ParameterValue pv = new ParameterValueBuilder().setIntValue(EtherTypeClassifierDefinition.IPv4_VALUE).build();\r
-        params.put(EtherTypeClassifierDefinition.ETHERTYPE_PARAM, pv);\r
-\r
-        List<Map<String, ParameterValue>> result = derivator.deriveParameter(params);\r
-\r
-        assertEquals(1, result.size());\r
-        assertEquals(params, result.get(0));\r
-    }\r
-\r
-    @Test\r
-    public void testDeriveParameter_withDerivation() {\r
-        Map<String, ParameterValue> params = new HashMap<>();\r
-        ParameterValue pv = new ParameterValueBuilder().setIntValue(EtherTypeClassifierDefinition.IPv4_VALUE).build();\r
-        params.put("dummy key", pv);\r
-\r
-        List<Map<String, ParameterValue>> derivedParams = derivator.deriveParameter(params);\r
-\r
-        assertEquals(2, derivedParams.size());\r
-\r
-        Map<String, ParameterValue> ipv4Params = derivedParams.get(0);\r
-        Map<String, ParameterValue> ipv6Params = derivedParams.get(1);\r
-\r
-        assertTrue(ipv4Params.containsKey(EtherTypeClassifierDefinition.ETHERTYPE_PARAM));\r
-        assertTrue(ipv6Params.containsKey(EtherTypeClassifierDefinition.ETHERTYPE_PARAM));\r
-    }\r
-\r
-}\r
+/*
+ * Copyright (c) 2016 Cisco Systems, Inc. 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.groupbasedpolicy.renderer.iovisor.sf;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Test;
+import org.opendaylight.groupbasedpolicy.api.sf.EtherTypeClassifierDefinition;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.subject.feature.instance.ParameterValue;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.subject.feature.instance.ParameterValueBuilder;
+
+public class ParamDerivatorTest {
+
+    private ParamDerivator derivator = ParamDerivator.ETHER_TYPE_DERIVATOR;
+
+    @Test
+    public void testDeriveParameter_noDerivation() {
+        Map<String, ParameterValue> params = new HashMap<>();
+        ParameterValue pv = new ParameterValueBuilder().setIntValue(EtherTypeClassifierDefinition.IPv4_VALUE).build();
+        params.put(EtherTypeClassifierDefinition.ETHERTYPE_PARAM, pv);
+
+        List<Map<String, ParameterValue>> result = derivator.deriveParameter(params);
+
+        assertEquals(1, result.size());
+        assertEquals(params, result.get(0));
+    }
+
+    @Test
+    public void testDeriveParameter_withDerivation() {
+        Map<String, ParameterValue> params = new HashMap<>();
+        ParameterValue pv = new ParameterValueBuilder().setIntValue(EtherTypeClassifierDefinition.IPv4_VALUE).build();
+        params.put("dummy key", pv);
+
+        List<Map<String, ParameterValue>> derivedParams = derivator.deriveParameter(params);
+
+        assertEquals(2, derivedParams.size());
+
+        Map<String, ParameterValue> ipv4Params = derivedParams.get(0);
+        Map<String, ParameterValue> ipv6Params = derivedParams.get(1);
+
+        assertTrue(ipv4Params.containsKey(EtherTypeClassifierDefinition.ETHERTYPE_PARAM));
+        assertTrue(ipv6Params.containsKey(EtherTypeClassifierDefinition.ETHERTYPE_PARAM));
+    }
+
+}