Merge "Remove redundant exception declarations"
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / services / batch / FlatBatchMeterAdaptersTest.java
index 7ef5d07adb691cd2014fed8611fac0cbb55d2593..bf487d3e7e6e22b2f2faa7c67add03f231928416 100644 (file)
@@ -53,14 +53,15 @@ public class FlatBatchMeterAdaptersTest {
     private static final NodeRef NODE_REF = new NodeRef(NODE_II);
 
     @Test
-    public void testAdaptFlatBatchAddMeter() throws Exception {
+    public void testAdaptFlatBatchAddMeter() {
         final BatchPlanStep planStep = new BatchPlanStep(BatchStepType.FLOW_ADD);
         planStep.setBarrierAfter(true);
         planStep.getTaskBag().addAll(Lists.newArrayList(
                 createAddMeterBatch(1L),
                 createAddMeterBatch(2L)));
 
-        final AddMetersBatchInput addMetersBatchInput = FlatBatchMeterAdapters.adaptFlatBatchAddMeter(planStep, NODE_REF);
+        final AddMetersBatchInput addMetersBatchInput =
+                FlatBatchMeterAdapters.adaptFlatBatchAddMeter(planStep, NODE_REF);
 
         Assert.assertTrue(addMetersBatchInput.isBarrierAfter());
         Assert.assertEquals(2, addMetersBatchInput.getBatchAddMeters().size());
@@ -92,39 +93,45 @@ public class FlatBatchMeterAdaptersTest {
     }
 
     @Test
-    public void testAdaptFlatBatchRemoveMeter() throws Exception {
+    public void testAdaptFlatBatchRemoveMeter() {
         final BatchPlanStep planStep = new BatchPlanStep(BatchStepType.FLOW_REMOVE);
         planStep.setBarrierAfter(true);
         planStep.getTaskBag().addAll(Lists.newArrayList(
                 createRemoveMeterBatch(1L),
                 createRemoveMeterBatch(2L)));
 
-        final RemoveMetersBatchInput removeMetersBatchInput = FlatBatchMeterAdapters.adaptFlatBatchRemoveMeter(planStep, NODE_REF);
+        final RemoveMetersBatchInput removeMetersBatchInput =
+                FlatBatchMeterAdapters.adaptFlatBatchRemoveMeter(planStep, NODE_REF);
 
         Assert.assertTrue(removeMetersBatchInput.isBarrierAfter());
         Assert.assertEquals(2, removeMetersBatchInput.getBatchRemoveMeters().size());
-        Assert.assertEquals(1L, removeMetersBatchInput.getBatchRemoveMeters().get(0).getMeterId().getValue().longValue());
-        Assert.assertEquals(2L, removeMetersBatchInput.getBatchRemoveMeters().get(1).getMeterId().getValue().longValue());
+        Assert.assertEquals(1L,
+                removeMetersBatchInput.getBatchRemoveMeters().get(0).getMeterId().getValue().longValue());
+        Assert.assertEquals(2L,
+                removeMetersBatchInput.getBatchRemoveMeters().get(1).getMeterId().getValue().longValue());
     }
 
     @Test
-    public void testAdaptFlatBatchUpdateMeter() throws Exception {
+    public void testAdaptFlatBatchUpdateMeter() {
         final BatchPlanStep planStep = new BatchPlanStep(BatchStepType.FLOW_UPDATE);
         planStep.setBarrierAfter(true);
         planStep.getTaskBag().addAll(Lists.newArrayList(
                 createUpdateMeterBatch(1L),
                 createUpdateMeterBatch(2L)));
 
-        final UpdateMetersBatchInput updateMetersBatchInput = FlatBatchMeterAdapters.adaptFlatBatchUpdateMeter(planStep, NODE_REF);
+        final UpdateMetersBatchInput updateMetersBatchInput =
+                FlatBatchMeterAdapters.adaptFlatBatchUpdateMeter(planStep, NODE_REF);
 
         Assert.assertTrue(updateMetersBatchInput.isBarrierAfter());
         Assert.assertEquals(2, updateMetersBatchInput.getBatchUpdateMeters().size());
-        Assert.assertEquals(1L, updateMetersBatchInput.getBatchUpdateMeters().get(0).getUpdatedBatchedMeter().getMeterId().getValue().longValue());
-        Assert.assertEquals(2L, updateMetersBatchInput.getBatchUpdateMeters().get(1).getUpdatedBatchedMeter().getMeterId().getValue().longValue());
+        Assert.assertEquals(1L, updateMetersBatchInput.getBatchUpdateMeters().get(0)
+                .getUpdatedBatchedMeter().getMeterId().getValue().longValue());
+        Assert.assertEquals(2L, updateMetersBatchInput.getBatchUpdateMeters().get(1)
+                .getUpdatedBatchedMeter().getMeterId().getValue().longValue());
     }
 
     @Test
-    public void testCreateBatchMeterChainingFunction_failures() throws Exception {
+    public void testCreateBatchMeterChainingFunction_failures() {
         final RpcResult<BatchMeterOutputListGrouping> input = RpcResultBuilder.<BatchMeterOutputListGrouping>failed()
                 .withError(RpcError.ErrorType.APPLICATION, "ut-meterError")
                 .withResult(new AddMetersBatchOutputBuilder()
@@ -143,11 +150,12 @@ public class FlatBatchMeterAdaptersTest {
         Assert.assertEquals(2, rpcResult.getResult().getBatchFailure().size());
         Assert.assertEquals(3, rpcResult.getResult().getBatchFailure().get(0).getBatchOrder().intValue());
         Assert.assertEquals(4, rpcResult.getResult().getBatchFailure().get(1).getBatchOrder().intValue());
-        Assert.assertEquals(2L, ((FlatBatchFailureMeterIdCase) rpcResult.getResult().getBatchFailure().get(1).getBatchItemIdChoice()).getMeterId().getValue().longValue());
+        Assert.assertEquals(2L, ((FlatBatchFailureMeterIdCase) rpcResult.getResult().getBatchFailure().get(1)
+                .getBatchItemIdChoice()).getMeterId().getValue().longValue());
     }
 
     @Test
-    public void testCreateBatchMeterChainingFunction_successes() throws Exception {
+    public void testCreateBatchMeterChainingFunction_successes() {
         final RpcResult<BatchMeterOutputListGrouping> input = RpcResultBuilder
                 .<BatchMeterOutputListGrouping>success(new AddMetersBatchOutputBuilder().build())
                 .build();