Remove redundant exception declarations
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / protocol / deserialization / instruction / GoToTableInstructionDeserializerTest.java
index a905a92284583e362289d36bb5653952a088820c..02049513572eecc40654b94c439118d007290872 100644 (file)
@@ -10,18 +10,17 @@ package org.opendaylight.openflowplugin.impl.protocol.deserialization.instructio
 
 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);
@@ -30,7 +29,7 @@ public class GoToTableInstructionDeserializerTest extends AbstractInstructionDes
 
         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());
     }