Merge "Remove redundant exception declarations"
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / protocol / deserialization / action / SetMplsTtlActionDeserializerTest.java
index 60f03194fd888807b4027ccd6f35d27abfdc2099..c4c06a77f14783862eab2b56e420a8a8a8c8827a 100644 (file)
@@ -21,7 +21,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.acti
 public class SetMplsTtlActionDeserializerTest extends AbstractActionDeserializerTest {
 
     @Test
-    public void testDeserialize() throws Exception {
+    public void testDeserialize() {
         final ByteBuf in = UnpooledByteBufAllocator.DEFAULT.buffer();
         final short mplsTtl = 10;
         writeHeader(in);
@@ -29,8 +29,8 @@ public class SetMplsTtlActionDeserializerTest extends AbstractActionDeserializer
         in.writeZero(ActionConstants.SET_MPLS_TTL_PADDING);
 
         final Action action = deserializeAction(in);
-        assertTrue(SetMplsTtlActionCase.class.isInstance(action));
-        assertEquals(mplsTtl, SetMplsTtlActionCase.class.cast(action).getSetMplsTtlAction().getMplsTtl().shortValue());
+        assertTrue(action instanceof SetMplsTtlActionCase);
+        assertEquals(mplsTtl, ((SetMplsTtlActionCase) action).getSetMplsTtlAction().getMplsTtl().shortValue());
         assertEquals(0, in.readableBytes());
     }