Use ByteBuf.readRetainedSlice()
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / protocol / serialization / match / ArpSourceTransportAddressEntrySerializerTest.java
index f1a62286634cdaa3275edff4a04ff5d3b0ff59ef..0f65a271c23d82e62b8ab89f635f27024546a739 100644 (file)
@@ -5,13 +5,11 @@
  * 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.openflowplugin.impl.protocol.serialization.match;
 
 import static org.junit.Assert.assertArrayEquals;
 
 import org.junit.Test;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;
@@ -19,9 +17,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.ArpMatchBuilder;
 
 public class ArpSourceTransportAddressEntrySerializerTest extends AbstractMatchEntrySerializerTest {
-
     @Test
-    public void testSerialize() throws Exception {
+    public void testSerialize() {
         final Match arpSpaMatch = new MatchBuilder()
                 .setLayer3Match(new ArpMatchBuilder()
                         .setArpSourceTransportAddress(new Ipv4Prefix("10.0.2.0/24"))
@@ -53,7 +50,7 @@ public class ArpSourceTransportAddressEntrySerializerTest extends AbstractMatchE
 
     @Override
     protected short getLength() {
-        return EncodeConstants.SIZE_OF_INT_IN_BYTES;
+        return Integer.BYTES;
     }
 
     @Override
@@ -65,5 +62,4 @@ public class ArpSourceTransportAddressEntrySerializerTest extends AbstractMatchE
     protected int getOxmClassCode() {
         return OxmMatchConstants.OPENFLOW_BASIC_CLASS;
     }
-
 }