Final round of isFoo() migration
[openflowplugin.git] / extension / openflowjava-extension-nicira / src / test / java / org / opendaylight / openflowjava / nx / codec / match / Reg7CodecTest.java
index 70620f5b2bb30fbd44177b79898fbe817253a570..549cdb172a35f049870755220b427ecbe043712e 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 Reg7CodecTest {
+    private final ByteBuf buffer = ByteBufAllocator.DEFAULT.buffer();
+    private final Reg7Codec reg7Codec = new Reg7Codec();
 
-    Reg7Codec reg7Codec;
-    ByteBuf buffer;
-    MatchEntry input;
+    private MatchEntry input;
 
     private static final int NXM_FIELD_CODE = 7;
     private static final int VALUE_LENGTH = 4;
 
-    @Before
-    public void setUp() {
-        reg7Codec = new Reg7Codec();
-        buffer = ByteBufAllocator.DEFAULT.buffer();
-    }
-
     @Test
     public void serializeTest() {
         input = createMatchEntry();
@@ -61,7 +54,7 @@ public class Reg7CodecTest {
 
         assertEquals(Nxm1Class.class, input.getOxmClass());
         assertEquals(NxmNxReg7.class, input.getOxmMatchField());
-        assertEquals(false, input.isHasMask());
+        assertEquals(false, input.getHasMask());
         assertEquals(1, result.getRegValues().getValue().intValue());
     }
 
@@ -81,7 +74,7 @@ public class Reg7CodecTest {
         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;