Make methods static
[openflowplugin.git] / extension / openflowjava-extension-nicira / src / test / java / org / opendaylight / openflowjava / nx / codec / action / RegLoadCodecTest.java
index baa08fea70529b1c70ba2a8f8a0e95351da94ab1..90e790f82008bd56b3f9b0aca97d9c3933d38887 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.action;
 
 import static org.junit.Assert.assertEquals;
@@ -25,14 +24,13 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.reg.load.grouping.NxActionRegLoadBuilder;
 
 public class RegLoadCodecTest {
+    private static final int LENGTH = 24;
+    private static final byte SUBTYPE = 7;
 
     RegLoadCodec regLoadCodec;
     ByteBuf buffer;
     Action action;
 
-    private final int LENGTH = 24;
-    private final byte SUBTYPE = 7;
-
     @Before
     public void setUp() {
         regLoadCodec = new RegLoadCodec();
@@ -70,11 +68,11 @@ public class RegLoadCodecTest {
         assertEquals(0, buffer.readableBytes());
     }
 
-    private Action createAction() {
+    private static Action createAction() {
         ExperimenterId experimenterId = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
         ActionBuilder actionBuilder = new ActionBuilder();
         actionBuilder.setExperimenterId(experimenterId);
-        ActionRegLoadBuilder actionRegLoadBuilder = new ActionRegLoadBuilder();
+        final ActionRegLoadBuilder actionRegLoadBuilder = new ActionRegLoadBuilder();
         NxActionRegLoadBuilder nxActionRegLoadBuilder = new NxActionRegLoadBuilder();
 
         nxActionRegLoadBuilder.setOfsNbits(1);
@@ -87,7 +85,7 @@ public class RegLoadCodecTest {
         return actionBuilder.build();
     }
 
-    private void createBuffer(ByteBuf message) {
+    private static void createBuffer(ByteBuf message) {
         message.writeShort(EncodeConstants.EXPERIMENTER_VALUE);
         message.writeShort(LENGTH);
         message.writeInt(NiciraConstants.NX_VENDOR_ID.intValue());
@@ -97,5 +95,4 @@ public class RegLoadCodecTest {
         message.writeInt(2);
         message.writeLong(3);
     }
-
-}
\ No newline at end of file
+}