Fix container startup
[vfc/nfvo/driver/vnfm/svnfm.git] / nokiav2 / driver / src / test / java / org / onap / vfc / nfvo / driver / vnfm / svnfm / nokia / util / TestSystemFunctions.java
index ec1ebd7..c627bfc 100644 (file)
 
 package org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.util;
 
-import org.junit.Test;
-
 import java.util.Base64;
 import java.util.HashSet;
 import java.util.Set;
+import org.junit.Test;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.NokiaSvnfmApplication;
+import org.onap.vfc.nfvo.driver.vnfm.svnfm.nokia.vnfm.Useless;
+import org.springframework.boot.SpringApplication;
 
 import static org.junit.Assert.*;
 
@@ -109,10 +111,20 @@ public class TestSystemFunctions {
 
     /**
      * Test HTTP client wrapping
-     * (semi useless test)
      */
     @Test
+    @Useless //more less already ensured by Java type safety
     public void testHttp() {
         assertNotNull(SystemFunctions.systemFunctions().getHttpClient());
     }
+
+    /**
+     * Test spring application wrapping
+      */
+    @Test
+    public void testSpring(){
+        SpringApplication springApplication = SystemFunctions.systemFunctions().newSpringApplication(NokiaSvnfmApplication.class);
+
+        assertEquals(1, springApplication.getAllSources().size());
+    }
 }