Make methods static
[openflowplugin.git] / extension / openflowjava-extension-nicira / src / test / java / org / opendaylight / openflowjava / nx / codec / match / NsiCodecTest.java
index 0fc6a2c8baf1987e95592585c35022e834f2acd5..ba1e1e3a37ecf0519583415f2bf1cd2b3557da15 100644 (file)
@@ -1,11 +1,10 @@
-/**
+/*
  * 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.openflowjava.nx.codec.match;
 
 import static org.junit.Assert.assertEquals;
@@ -20,6 +19,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev14
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.experimenter.id._case.NxExpMatchEntryValue;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.experimenter.id._case.nx.exp.match.entry.value.NsiCaseValue;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.oxm.container.match.entry.value.experimenter.id._case.nx.exp.match.entry.value.NsiCaseValueBuilder;
+import org.opendaylight.yangtools.yang.common.Uint8;
 
 public class NsiCodecTest {
 
@@ -62,7 +62,7 @@ public class NsiCodecTest {
 
         NxExpMatchEntryValue value = nsiCodec.deserializeValue(buffer, false);
 
-        assertEquals(NSI_VALUE, ((NsiCaseValue) value).getNsiValues().getNsi());
+        assertEquals(Uint8.valueOf(NSI_VALUE), ((NsiCaseValue) value).getNsiValues().getNsi());
         assertFalse(buffer.isReadable());
     }
 
@@ -72,17 +72,17 @@ public class NsiCodecTest {
 
         NxExpMatchEntryValue value = nsiCodec.deserializeValue(buffer, true);
 
-        assertEquals(NSI_VALUE, ((NsiCaseValue) value).getNsiValues().getNsi());
-        assertEquals(NSI_MASK, ((NsiCaseValue) value).getNsiValues().getMask());
+        assertEquals(Uint8.valueOf(NSI_VALUE), ((NsiCaseValue) value).getNsiValues().getNsi());
+        assertEquals(Uint8.valueOf(NSI_MASK), ((NsiCaseValue) value).getNsiValues().getMask());
         assertFalse(buffer.isReadable());
     }
 
-    private NxExpMatchEntryValue createMatchEntryValue(Short value, Short mask) {
+    private static NxExpMatchEntryValue createMatchEntryValue(Short value, Short mask) {
         NsiValues nsiValues = new NsiValuesBuilder().setNsi(value).setMask(mask).build();
         return new NsiCaseValueBuilder().setNsiValues(nsiValues).build();
     }
 
-    private void writeBuffer(ByteBuf message, Short value, Short mask) {
+    private static void writeBuffer(ByteBuf message, Short value, Short mask) {
         message.writeByte(value.intValue());
         if (mask != null) {
             message.writeByte(mask.intValue());