import static org.junit.Assert.assertEquals;
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.UnpooledByteBufAllocator;
import org.junit.Test;
import org.opendaylight.openflowjava.protocol.impl.util.InstructionConstants;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.GoToTableCase;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.UnpooledByteBufAllocator;
-
public class GoToTableInstructionDeserializerTest extends AbstractInstructionDeserializerTest {
@Test
- public void testDeserialize() throws Exception {
+ public void testDeserialize() {
final ByteBuf in = UnpooledByteBufAllocator.DEFAULT.buffer();
final short tableId = 3;
writeHeader(in);
final Instruction instruction = deserializeInstruction(in);
assertEquals(GoToTableCase.class, instruction.getImplementedInterface());
- assertEquals(tableId, GoToTableCase.class.cast(instruction).getGoToTable().getTableId().shortValue());
+ assertEquals(tableId, ((GoToTableCase) instruction).getGoToTable().getTableId().shortValue());
assertEquals(0, in.readableBytes());
}