AAI-1523 Batch reformat aai-core
[aai/aai-common.git] / aai-core / src / test / java / org / onap / aai / introspection / tools / InjectKeysFromURITest.java
index 713a8ae..cd5bdb9 100644 (file)
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
+
 package org.onap.aai.introspection.tools;
 
+import static junit.framework.TestCase.assertNotNull;
+import static org.eclipse.persistence.jpa.jpql.Assert.fail;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.net.URI;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.onap.aai.AAISetup;
@@ -26,14 +35,6 @@ import org.onap.aai.introspection.*;
 import org.onap.aai.introspection.exceptions.AAIUnknownObjectException;
 import org.springframework.test.annotation.DirtiesContext;
 
-import java.net.URI;
-
-import static junit.framework.TestCase.assertNotNull;
-import static org.eclipse.persistence.jpa.jpql.Assert.fail;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
 @DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
 public class InjectKeysFromURITest extends AAISetup {
 
@@ -43,19 +44,20 @@ public class InjectKeysFromURITest extends AAISetup {
 
     @Before
     public void setup() {
-        loader  = loaderFactory.createLoaderForVersion(ModelType.MOXY, schemaVersions.getDefaultVersion());
-        issue   = new Issue();
+        loader = loaderFactory.createLoaderForVersion(ModelType.MOXY, schemaVersions.getDefaultVersion());
+        issue = new Issue();
     }
+
     @Test
     public void testInjectKeysFromURIOfPserverIsNotResolved() throws AAIUnknownObjectException {
         try {
             ik = new InjectKeysFromURI(loader, new URI("/aai/v12/cloud-infrastructure/complexes"));
-        }catch(Exception e) {
+        } catch (Exception e) {
             fail("InjectKeys instantiation threw an exception");
         }
 
         Introspector pserver = loader.introspectorFromName("pserver");
-        pserver.setValue("in-maint",false);
+        pserver.setValue("in-maint", false);
         pserver.setValue("hostname", "pserver2");
         assertNotNull("Unable to load the template introspector", pserver);
 
@@ -68,13 +70,14 @@ public class InjectKeysFromURITest extends AAISetup {
 
         assertFalse("Unable to resolve the pserver in-maint issue", issueResolved);
         assertEquals("Introspector didn't successfully modify the pserver in-maint", false,
-            pserver.getValue("in-maint"));
+                pserver.getValue("in-maint"));
     }
+
     @Test
     public void testInjectKeysFromURIOfPserverSuccessfullyResolved() throws AAIUnknownObjectException {
         try {
             ik = new InjectKeysFromURI(loader, new URI("/aai/v12/cloud-infrastructure/pservers/pserver/pserver1"));
-        }catch(Exception e) {
+        } catch (Exception e) {
             fail("InjectKeys instantiation threw an exception");
         }