import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.UnpooledByteBufAllocator;
import org.junit.Test;
import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action;
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetNwTtlActionCase;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.UnpooledByteBufAllocator;
-
public class SetNwTtlActionDeserializerTest extends AbstractActionDeserializerTest {
@Test
in.writeZero(ActionConstants.SET_NW_TTL_PADDING);
final Action action = deserializeAction(in);
- assertTrue(SetNwTtlActionCase.class.isInstance(action));
- assertEquals(nwTtl, SetNwTtlActionCase.class.cast(action).getSetNwTtlAction().getNwTtl().shortValue());
+ assertTrue(action instanceof SetNwTtlActionCase);
+ assertEquals(nwTtl, ((SetNwTtlActionCase) action).getSetNwTtlAction().getNwTtl().shortValue());
assertEquals(0, in.readableBytes());
}