Final round of isFoo() migration
[openflowplugin.git] / extension / openflowjava-extension-nicira / src / test / java / org / opendaylight / openflowjava / nx / codec / match / Reg0CodecTest.java
index 0304e723eba36624e3a213f81384e3d05d1c3f20..20d6bbb5e5238eb961e5ce0f43de14382284a64d 100644 (file)
@@ -11,7 +11,6 @@ import static org.junit.Assert.assertEquals;
 
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.ByteBufAllocator;
-import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Nxm1Class;
@@ -24,20 +23,14 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev14
 import org.opendaylight.yangtools.yang.common.Uint32;
 
 public class Reg0CodecTest {
+    private final ByteBuf buffer = ByteBufAllocator.DEFAULT.buffer();
+    private final Reg0Codec reg0Codec = new Reg0Codec();
 
-    Reg0Codec reg0Codec;
-    ByteBuf buffer;
-    MatchEntry input;
+    private MatchEntry input;
 
     private static final int NXM_FIELD_CODE = 0;
     private static final int VALUE_LENGTH = 4;
 
-    @Before
-    public void setUp() {
-        reg0Codec = new Reg0Codec();
-        buffer = ByteBufAllocator.DEFAULT.buffer();
-    }
-
     @Test
     public void serializeTest() {
         input = createMatchEntry();
@@ -61,7 +54,7 @@ public class Reg0CodecTest {
 
         assertEquals(Nxm1Class.class, input.getOxmClass());
         assertEquals(NxmNxReg0.class, input.getOxmMatchField());
-        assertEquals(false, input.isHasMask());
+        assertEquals(false, input.getHasMask());
         assertEquals(1, result.getRegValues().getValue().intValue());
     }
 
@@ -81,7 +74,7 @@ public class Reg0CodecTest {
         return matchEntryBuilder.build();
     }
 
-    private static void createBuffer(ByteBuf message) {
+    private static void createBuffer(final ByteBuf message) {
         message.writeShort(OxmMatchConstants.NXM_1_CLASS);
 
         int fieldMask = NXM_FIELD_CODE << 1;