Bump upstreams
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / protocol / deserialization / match / ArpSourceHardwareAddressEntryDeserializerTest.java
index fa8f87d2a13f2ce29f016d122f2ae5cc8f35d1e5..b05af98df53a284a2be6ec3c4801bf191204f39e 100644 (file)
@@ -5,7 +5,6 @@
  * 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.deserialization.match;
 
 import static org.junit.Assert.assertEquals;
@@ -23,24 +22,25 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026
 public class ArpSourceHardwareAddressEntryDeserializerTest extends AbstractMatchEntryDeserializerTest {
 
     @Test
-    public void deserializeEntry() throws Exception {
+    public void deserializeEntry() {
         final ByteBuf in = UnpooledByteBufAllocator.DEFAULT.buffer();
         final MacAddress arpSourceHardwareAddress = new MacAddress("00:01:02:03:04:05");
         final MacAddress arpSourceHardwareAddressMask = new MacAddress("00:00:00:00:00:00");
 
         writeHeader(in, false);
-        in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(arpSourceHardwareAddress));
+        in.writeBytes(IetfYangUtil.macAddressBytes(arpSourceHardwareAddress));
 
         assertEquals(arpSourceHardwareAddress.getValue(),
-                ArpMatch.class.cast(deserialize(in).getLayer3Match()).getArpSourceHardwareAddress().getAddress().getValue());
+                ((ArpMatch) deserialize(in).getLayer3Match()).getArpSourceHardwareAddress().getAddress()
+                        .getValue());
         assertEquals(0, in.readableBytes());
 
         writeHeader(in, true);
-        in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(arpSourceHardwareAddress));
-        in.writeBytes(IetfYangUtil.INSTANCE.bytesFor(arpSourceHardwareAddressMask));
+        in.writeBytes(IetfYangUtil.macAddressBytes(arpSourceHardwareAddress));
+        in.writeBytes(IetfYangUtil.macAddressBytes(arpSourceHardwareAddressMask));
 
         final ArpSourceHardwareAddress desAddress =
-                ArpMatch.class.cast(deserialize(in).getLayer3Match()).getArpSourceHardwareAddress();
+                ((ArpMatch) deserialize(in).getLayer3Match()).getArpSourceHardwareAddress();
         assertEquals(arpSourceHardwareAddress.getValue(), desAddress.getAddress().getValue());
         assertEquals(arpSourceHardwareAddressMask.getValue(), desAddress.getMask().getValue());
         assertEquals(0, in.readableBytes());