-/**
+/*
* 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;
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();
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);
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());
message.writeInt(2);
message.writeLong(3);
}
-
-}
\ No newline at end of file
+}