Remove yang-test
[controller.git] / opendaylight / config / config-util / src / test / java / org / opendaylight / controller / config / util / LookupTest.java
index 4489762a47c7c83655201d3f357f2a9a15426ef7..9a6f931afdd0e1ac6752e944da117bf95631ab1b 100644 (file)
@@ -7,8 +7,20 @@
  */
 package org.opendaylight.controller.config.util;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Sets;
+import java.lang.management.ManagementFactory;
+import java.lang.reflect.Method;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -17,19 +29,6 @@ import org.opendaylight.controller.config.api.LookupRegistry;
 import org.opendaylight.controller.config.api.jmx.ConfigTransactionControllerMXBean;
 import org.opendaylight.controller.config.api.jmx.ObjectNameUtil;
 
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import java.lang.management.ManagementFactory;
-import java.lang.reflect.Method;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
 public class LookupTest {
 
     private TestingConfigRegistry testingRegistry;
@@ -93,8 +92,7 @@ public class LookupTest {
     public void testLookupConfigBeans2() throws Exception {
         Method method = LookupRegistry.class.getMethod("lookupConfigBeans",
                 String.class, String.class);
-        Object[] args = new Object[] { TestingConfigRegistry.moduleName1,
-                TestingConfigRegistry.instName1 };
+        Object[] args = new Object[] { TestingConfigRegistry.moduleName1, TestingConfigRegistry.instName1 };
         test(method, args);
     }
 
@@ -102,12 +100,11 @@ public class LookupTest {
     public void testLookupConfigBean() throws Exception {
         Method method = LookupRegistry.class.getMethod("lookupConfigBean",
                 String.class, String.class);
-        Object[] args = new Object[] { TestingConfigRegistry.moduleName1,
-                TestingConfigRegistry.instName1 };
+        Object[] args = new Object[] { TestingConfigRegistry.moduleName1, TestingConfigRegistry.instName1 };
         test(method, args);
     }
 
-    private void test(Method method, Object[] args) throws Exception {
+    private void test(final Method method, final Object[] args) throws Exception {
         for (Entry<LookupRegistry, ? extends Set<? extends LookupRegistry>> entry : lookupProvidersToClients
                 .entrySet()) {
             Object expected = method.invoke(entry.getKey(), args);
@@ -128,7 +125,7 @@ public class LookupTest {
                     client.lookupConfigBean(
                             InstanceNotFoundException.class.getSimpleName(), "");
                     fail(client.toString());
-                } catch (InstanceNotFoundException e) {
+                } catch (final InstanceNotFoundException e) {
 
                 }
             }