-/*\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.util;\r
-\r
-import org.junit.Assert;\r
-import org.junit.Test;\r
-import org.opendaylight.openflowjava.protocol.api.keys.experimenter.ExperimenterIdSerializerKey;\r
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterInput;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandExperimenterCase;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestExperimenterCase;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.grouping.TableFeatureProperties;\r
-\r
-/**\r
- * @author michal.polkorab\r
- *\r
- */\r
-public class ExperimenterSerializerKeyFactoryTest {\r
-\r
- /**\r
- * Test ExperimenterSerializerKeyFactory key creation\r
- */\r
- @Test\r
- public void test() {\r
- ExperimenterIdSerializerKey<?> createdKey = ExperimenterSerializerKeyFactory\r
- .createExperimenterMessageSerializerKey(EncodeConstants.OF10_VERSION_ID, 42L);\r
- ExperimenterIdSerializerKey<?> comparationKey =\r
- new ExperimenterIdSerializerKey<>(EncodeConstants.OF10_VERSION_ID, 42L, ExperimenterInput.class);\r
- Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
- createdKey = ExperimenterSerializerKeyFactory.createExperimenterMessageSerializerKey(\r
- EncodeConstants.OF10_VERSION_ID, null);\r
- comparationKey = new ExperimenterIdSerializerKey<>(EncodeConstants.OF10_VERSION_ID,\r
- null, ExperimenterInput.class);\r
- Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
- createdKey = ExperimenterSerializerKeyFactory.createMeterBandSerializerKey(\r
- EncodeConstants.OF10_VERSION_ID, 43L);\r
- comparationKey = new ExperimenterIdSerializerKey<>(EncodeConstants.OF10_VERSION_ID,\r
- 43L, MeterBandExperimenterCase.class);\r
- Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
- createdKey = ExperimenterSerializerKeyFactory.createMeterBandSerializerKey(\r
- EncodeConstants.OF10_VERSION_ID, null);\r
- comparationKey = new ExperimenterIdSerializerKey<>(EncodeConstants.OF10_VERSION_ID,\r
- null, MeterBandExperimenterCase.class);\r
- Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
- createdKey = ExperimenterSerializerKeyFactory.createMultipartRequestSerializerKey(\r
- EncodeConstants.OF10_VERSION_ID, 44L);\r
- comparationKey = new ExperimenterIdSerializerKey<>(EncodeConstants.OF10_VERSION_ID,\r
- 44L, MultipartRequestExperimenterCase.class);\r
- Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
- createdKey = ExperimenterSerializerKeyFactory.createMultipartRequestSerializerKey(\r
- EncodeConstants.OF10_VERSION_ID, null);\r
- comparationKey = new ExperimenterIdSerializerKey<>(EncodeConstants.OF10_VERSION_ID,\r
- null, MultipartRequestExperimenterCase.class);\r
- Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
- createdKey = ExperimenterSerializerKeyFactory.createMultipartRequestTFSerializerKey(\r
- EncodeConstants.OF10_VERSION_ID, 45L);\r
- comparationKey = new ExperimenterIdSerializerKey<>(EncodeConstants.OF10_VERSION_ID,\r
- 45L, TableFeatureProperties.class);\r
- Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
- createdKey = ExperimenterSerializerKeyFactory.createMultipartRequestTFSerializerKey(\r
- EncodeConstants.OF10_VERSION_ID, null);\r
- comparationKey = new ExperimenterIdSerializerKey<>(EncodeConstants.OF10_VERSION_ID,\r
- null, TableFeatureProperties.class);\r
- Assert.assertEquals("Wrong key created", comparationKey, createdKey);\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.util;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.opendaylight.openflowjava.protocol.api.keys.experimenter.ExperimenterIdSerializerKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandExperimenterCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestExperimenterCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.grouping.TableFeatureProperties;
+
+/**
+ * @author michal.polkorab
+ *
+ */
+public class ExperimenterSerializerKeyFactoryTest {
+
+ /**
+ * Test ExperimenterSerializerKeyFactory key creation
+ */
+ @Test
+ public void test() {
+ ExperimenterIdSerializerKey<?> createdKey = ExperimenterSerializerKeyFactory
+ .createExperimenterMessageSerializerKey(EncodeConstants.OF10_VERSION_ID, 42L);
+ ExperimenterIdSerializerKey<?> comparationKey =
+ new ExperimenterIdSerializerKey<>(EncodeConstants.OF10_VERSION_ID, 42L, ExperimenterInput.class);
+ Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+ createdKey = ExperimenterSerializerKeyFactory.createExperimenterMessageSerializerKey(
+ EncodeConstants.OF10_VERSION_ID, null);
+ comparationKey = new ExperimenterIdSerializerKey<>(EncodeConstants.OF10_VERSION_ID,
+ null, ExperimenterInput.class);
+ Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+ createdKey = ExperimenterSerializerKeyFactory.createMeterBandSerializerKey(
+ EncodeConstants.OF10_VERSION_ID, 43L);
+ comparationKey = new ExperimenterIdSerializerKey<>(EncodeConstants.OF10_VERSION_ID,
+ 43L, MeterBandExperimenterCase.class);
+ Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+ createdKey = ExperimenterSerializerKeyFactory.createMeterBandSerializerKey(
+ EncodeConstants.OF10_VERSION_ID, null);
+ comparationKey = new ExperimenterIdSerializerKey<>(EncodeConstants.OF10_VERSION_ID,
+ null, MeterBandExperimenterCase.class);
+ Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+ createdKey = ExperimenterSerializerKeyFactory.createMultipartRequestSerializerKey(
+ EncodeConstants.OF10_VERSION_ID, 44L);
+ comparationKey = new ExperimenterIdSerializerKey<>(EncodeConstants.OF10_VERSION_ID,
+ 44L, MultipartRequestExperimenterCase.class);
+ Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+ createdKey = ExperimenterSerializerKeyFactory.createMultipartRequestSerializerKey(
+ EncodeConstants.OF10_VERSION_ID, null);
+ comparationKey = new ExperimenterIdSerializerKey<>(EncodeConstants.OF10_VERSION_ID,
+ null, MultipartRequestExperimenterCase.class);
+ Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+ createdKey = ExperimenterSerializerKeyFactory.createMultipartRequestTFSerializerKey(
+ EncodeConstants.OF10_VERSION_ID, 45L);
+ comparationKey = new ExperimenterIdSerializerKey<>(EncodeConstants.OF10_VERSION_ID,
+ 45L, TableFeatureProperties.class);
+ Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+ createdKey = ExperimenterSerializerKeyFactory.createMultipartRequestTFSerializerKey(
+ EncodeConstants.OF10_VERSION_ID, null);
+ comparationKey = new ExperimenterIdSerializerKey<>(EncodeConstants.OF10_VERSION_ID,
+ null, TableFeatureProperties.class);
+ Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+ }
}
\ No newline at end of file