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);
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());
}