Make methods static
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / common / MultipartRequestInputFactoryTest.java
index 2a66f3a0c2ec97323d8aecf3451e572560b5cee0..82237057ff38192d8e586a9247f8ae17c838f240 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.common;
 
 import org.junit.Assert;
@@ -50,21 +49,21 @@ public class MultipartRequestInputFactoryTest {
 
     @Before
 
-    public void setUp() throws Exception {
+    public void setUp() {
         ofVersion = OFConstants.OFP_VERSION_1_3;
     }
 
     @Test
-    public void testMakeMultipartRequestInput_DESC() throws Exception {
+    public void testMakeMultipartRequestInput_DESC() {
         MultipartType mpType = MultipartType.OFPMPDESC;
         final MultipartRequestInput mpRqInput =
             (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
         checkHeader(mpRqInput, mpType);
-        checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(), MultipartRequestDescCase.class);
+        checkEmptyBody(mpRqInput.getMultipartRequestBody().implementedInterface(), MultipartRequestDescCase.class);
     }
 
     @Test
-    public void testMakeMultipartRequestInput_FLOW_13() throws Exception {
+    public void testMakeMultipartRequestInput_FLOW_13() {
         final MultipartType mpType = MultipartType.OFPMPFLOW;
         final MultipartRequestInput mpRqInput =
             (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
@@ -85,7 +84,7 @@ public class MultipartRequestInputFactoryTest {
     }
 
     @Test
-    public void testMakeMultipartRequestInput_FLOW_10() throws Exception {
+    public void testMakeMultipartRequestInput_FLOW_10() {
         final MultipartType mpType = MultipartType.OFPMPFLOW;
         ofVersion = OFConstants.OFP_VERSION_1_0;
         final MultipartRequestInput mpRqInput =
@@ -105,26 +104,26 @@ public class MultipartRequestInputFactoryTest {
     }
 
     @Test
-    public void testMakeMultipartRequestInputAggregate() throws Exception {
+    public void testMakeMultipartRequestInputAggregate() {
         MultipartType mpType = MultipartType.OFPMPAGGREGATE;
         final MultipartRequestInput mpRqInput =
             (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
         checkHeader(mpRqInput, mpType);
-        checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(),
+        checkEmptyBody(mpRqInput.getMultipartRequestBody().implementedInterface(),
                 MultipartRequestAggregateCase.class);
     }
 
     @Test
-    public void testMakeMultipartRequestInputTable() throws Exception {
+    public void testMakeMultipartRequestInputTable() {
         MultipartType mpType = MultipartType.OFPMPTABLE;
         final MultipartRequestInput mpRqInput =
             (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
         checkHeader(mpRqInput, mpType);
-        checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(), MultipartRequestTableCase.class);
+        checkEmptyBody(mpRqInput.getMultipartRequestBody().implementedInterface(), MultipartRequestTableCase.class);
     }
 
     @Test
-    public void testMakeMultipartRequestInputPortStats() throws Exception {
+    public void testMakeMultipartRequestInputPortStats() {
         final MultipartType mpType = MultipartType.OFPMPPORTSTATS;
         final MultipartRequestInput mpRqInput =
             (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
@@ -137,7 +136,7 @@ public class MultipartRequestInputFactoryTest {
     }
 
     @Test
-    public void testMakeMultipartRequestInputQueue() throws Exception {
+    public void testMakeMultipartRequestInputQueue() {
         final MultipartType mpType = MultipartType.OFPMPQUEUE;
         final MultipartRequestInput mpRqInput =
             (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
@@ -151,7 +150,7 @@ public class MultipartRequestInputFactoryTest {
     }
 
     @Test
-    public void testMakeMultipartRequestInputGroup() throws Exception {
+    public void testMakeMultipartRequestInputGroup() {
         final MultipartType mpType = MultipartType.OFPMPGROUP;
         final MultipartRequestInput mpRqInput =
             (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
@@ -164,27 +163,27 @@ public class MultipartRequestInputFactoryTest {
     }
 
     @Test
-    public void testMakeMultipartRequestInputGroupDesc() throws Exception {
+    public void testMakeMultipartRequestInputGroupDesc() {
         MultipartType mpType = MultipartType.OFPMPGROUPDESC;
         final MultipartRequestInput mpRqInput =
             (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
         checkHeader(mpRqInput, mpType);
-        checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(),
+        checkEmptyBody(mpRqInput.getMultipartRequestBody().implementedInterface(),
                 MultipartRequestGroupDescCase.class);
     }
 
     @Test
-    public void testMakeMultipartRequestInputGroupFeatures() throws Exception {
+    public void testMakeMultipartRequestInputGroupFeatures() {
         MultipartType mpType = MultipartType.OFPMPGROUPFEATURES;
         final MultipartRequestInput mpRqInput =
             (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
         checkHeader(mpRqInput, mpType);
-        checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(),
+        checkEmptyBody(mpRqInput.getMultipartRequestBody().implementedInterface(),
                 MultipartRequestGroupFeaturesCase.class);
     }
 
     @Test
-    public void testMakeMultipartRequestInputMeter() throws Exception {
+    public void testMakeMultipartRequestInputMeter() {
         final MultipartType mpType = MultipartType.OFPMPMETER;
         final MultipartRequestInput mpRqInput =
             (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
@@ -197,7 +196,7 @@ public class MultipartRequestInputFactoryTest {
     }
 
     @Test
-    public void testMakeMultipartRequestInputMeterConfig() throws Exception {
+    public void testMakeMultipartRequestInputMeterConfig() {
         final MultipartType mpType = MultipartType.OFPMPMETERCONFIG;
         final MultipartRequestInput mpRqInput =
             (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
@@ -211,17 +210,17 @@ public class MultipartRequestInputFactoryTest {
     }
 
     @Test
-    public void testMakeMultipartRequestInputMeterFeatures() throws Exception {
+    public void testMakeMultipartRequestInputMeterFeatures() {
         MultipartType mpType = MultipartType.OFPMPMETERFEATURES;
         final MultipartRequestInput mpRqInput =
             (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
         checkHeader(mpRqInput, mpType);
-        checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(),
+        checkEmptyBody(mpRqInput.getMultipartRequestBody().implementedInterface(),
                 MultipartRequestMeterFeaturesCase.class);
     }
 
     @Test
-    public void testMakeMultipartRequestInputTableFeatures() throws Exception {
+    public void testMakeMultipartRequestInputTableFeatures() {
         final MultipartType mpType = MultipartType.OFPMPTABLEFEATURES;
         final MultipartRequestInput mpRqInput =
             (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
@@ -235,22 +234,22 @@ public class MultipartRequestInputFactoryTest {
     }
 
     @Test
-    public void testMakeMultipartRequestInputPortDesc() throws Exception {
+    public void testMakeMultipartRequestInputPortDesc() {
         MultipartType mpType = MultipartType.OFPMPPORTDESC;
         final MultipartRequestInput mpRqInput =
             (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
         checkHeader(mpRqInput, mpType);
-        checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(),
+        checkEmptyBody(mpRqInput.getMultipartRequestBody().implementedInterface(),
                 MultipartRequestPortDescCase.class);
     }
 
     @Test
-    public void testMakeMultipartRequestInputExperimenter() throws Exception {
+    public void testMakeMultipartRequestInputExperimenter() {
         MultipartType mpType = MultipartType.OFPMPEXPERIMENTER;
         final MultipartRequestInput mpRqInput =
             (MultipartRequestInput) MultipartRequestInputFactory.makeMultipartRequest(xid, ofVersion, mpType, false);
         checkHeader(mpRqInput, mpType);
-        checkEmptyBody(mpRqInput.getMultipartRequestBody().getImplementedInterface(),
+        checkEmptyBody(mpRqInput.getMultipartRequestBody().implementedInterface(),
                 MultipartRequestExperimenterCase.class);
     }
 
@@ -261,8 +260,8 @@ public class MultipartRequestInputFactoryTest {
         Assert.assertEquals(xid, mpRqInput.getXid().longValue());
     }
 
-    private void checkEmptyBody(Class<? extends DataContainer> mpRqBody, Class<? extends
-            MultipartRequestBody> expectedMpRqBodyClass) throws Exception {
+    private static void checkEmptyBody(Class<? extends DataContainer> mpRqBody, Class<? extends
+            MultipartRequestBody> expectedMpRqBodyClass) {
         Assert.assertTrue(expectedMpRqBodyClass.isAssignableFrom(mpRqBody));
         Assert.assertEquals(expectedMpRqBodyClass, mpRqBody);
     }