Fixes for sonar critical issues
[policy/engine.git] / PolicyEngineAPI / src / test / java / org / onap / policy / std / test / AutoClientUEBTest.java
index 94c2ac7..eef76bd 100644 (file)
@@ -119,369 +119,6 @@ public class AutoClientUEBTest {
                assertNotNull(result);
        }
 
-       /**
-        * Run the boolean isRunning() method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testIsRunning_1()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(), "", "");
-               fixture.isRunning = true;
-
-               boolean result = fixture.isRunning();
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-               assertTrue(result);
-       }
-
-       /**
-        * Run the void run() method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testRun_1()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(), "", "");
-               fixture.isRunning = true;
-
-               fixture.run();
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-       }
-
-       /**
-        * Run the void run() method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testRun_2()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(), "", "");
-               fixture.isRunning = true;
-
-               fixture.run();
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-       }
-
-       /**
-        * Run the void run() method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testRun_3()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(), "", "");
-               fixture.isRunning = true;
-
-               fixture.run();
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-       }
-
-       /**
-        * Run the void run() method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testRun_4()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(), "", "");
-               fixture.isRunning = true;
-
-               fixture.run();
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-       }
-
-       /**
-        * Run the void run() method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testRun_5()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
-               fixture.isRunning = true;
-
-               fixture.run();
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-       }
-
-       /**
-        * Run the void run() method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testRun_6()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
-               fixture.isRunning = true;
-
-               fixture.run();
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-       }
-
-       /**
-        * Run the void run() method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testRun_7()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
-               fixture.isRunning = true;
-
-               fixture.run();
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-       }
-
-       /**
-        * Run the void run() method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testRun_8()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
-               fixture.isRunning = true;
-
-               fixture.run();
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-       }
-
-       /**
-        * Run the void run() method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testRun_9()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
-               fixture.isRunning = true;
-
-               fixture.run();
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-       }
-
-       /**
-        * Run the void run() method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testRun_10()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
-               fixture.isRunning = true;
-
-               fixture.run();
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-       }
-
-       /**
-        * Run the void run() method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testRun_11()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
-               fixture.isRunning = true;
-
-               fixture.run();
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-       }
-
-       /**
-        * Run the void run() method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testRun_12()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
-               fixture.isRunning = true;
-
-               fixture.run();
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-       }
-
-       /**
-        * Run the void run() method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testRun_13()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
-               fixture.isRunning = true;
-
-               fixture.run();
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-       }
-
-       /**
-        * Run the void run() method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testRun_14()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
-               fixture.isRunning = true;
-
-               fixture.run();
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-       }
-
-       /**
-        * Run the void run() method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testRun_15()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
-               fixture.isRunning = true;
-
-               fixture.run();
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-       }
-
-       /**
-        * Run the void run() method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testRun_16()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
-               fixture.isRunning = true;
-
-               fixture.run();
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-       }
-
-       /**
-        * Run the void setAuto(NotificationScheme,NotificationHandler) method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testSetAuto_1()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
-               fixture.isRunning = true;
-               NotificationScheme scheme = NotificationScheme.AUTO_ALL_NOTIFICATIONS;
-               NotificationHandler handler = null;
-
-               fixture.setAuto(scheme, handler);
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-       }
-
        /**
         * Run the void setScheme(NotificationScheme) method test.
         *
@@ -501,26 +138,6 @@ public class AutoClientUEBTest {
                //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
        }
 
-       /**
-        * Run the void terminate() method test.
-        *
-        * @throws Exception
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testTerminate_1()
-               throws Exception {
-               AutoClientUEB fixture = new AutoClientUEB("", new LinkedList<String>(),"","");
-               fixture.isRunning = true;
-
-               fixture.terminate();
-
-               // add additional test code here
-               // An unexpected exception was thrown in user code while executing this test:
-               //    java.lang.NoClassDefFoundError: Could not initialize class org.onap.policy.std.AutoClientUEB
-       }
-
        /**
         * Perform pre-test initialization.
         *
@@ -535,9 +152,10 @@ public class AutoClientUEBTest {
                // add set up code here
                List<String> urlList = new LinkedList<String>();
                urlList.add("test2.com");
-               AutoClientUEB client = new AutoClientUEB("test.com", urlList, "testKey", "testSecret");
+               @SuppressWarnings("unused")
+        AutoClientUEB client = new AutoClientUEB("test.com", urlList, "testKey", "testSecret");
                NotificationHandler handler = null;
-               client.setAuto(NotificationScheme.AUTO_ALL_NOTIFICATIONS, handler);
+               AutoClientUEB.setAuto(NotificationScheme.AUTO_ALL_NOTIFICATIONS, handler);
        }
 
        /**