Replaced all tabs with spaces in java and pom.xml
[so.git] / bpmn / so-bpmn-infrastructure-common / src / test / java / org / onap / so / bpmn / infrastructure / pnf / delegate / ConfigCheckerDelegateTest.java
index 571f643..5000ca0 100644 (file)
@@ -1,20 +1,15 @@
 /*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
- *  ================================================================================
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
+ * ============LICENSE_START======================================================= Copyright (C) 2019 Nordix
+ * Foundation. ================================================================================ Licensed under the
+ * Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may
+ * obtain a copy of the License at
  *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language governing permissions and limitations under the
+ * License.
  *
- *  SPDX-License-Identifier: Apache-2.0
- *  ============LICENSE_END=========================================================
+ * SPDX-License-Identifier: Apache-2.0 ============LICENSE_END=========================================================
  */
 
 package org.onap.so.bpmn.infrastructure.pnf.delegate;
@@ -30,7 +25,6 @@ import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableName
 import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PRC_INSTANCE_NAME;
 import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.SERVICE_MODEL_INFO;
 import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.SKIP_POST_INSTANTIATION_CONFIGURATION;
-
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -52,7 +46,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 @RunWith(SpringJUnit4ClassRunner.class)
 @ContextConfiguration(classes = {CatalogDbClient.class, ExceptionBuilder.class, ConfigCheckerDelegate.class,
-    ProcessEngineConfiguration.class})
+        ProcessEngineConfiguration.class})
 public class ConfigCheckerDelegateTest {
 
     private static String TEST_PROCESS_KEY = "processKey1";
@@ -64,14 +58,11 @@ public class ConfigCheckerDelegateTest {
     /**
      * Service model info json.
      */
-    private static String TEST_SERVICE_MODEL_INFO = "{\n"
-        + "      \"modelType\":\"service\",\n"
-        + "      \"modelInvariantUuid\":\"539b7a2f-9524-4dbf-9eee-f2e05521df3f\",\n"
-        + "      \"modelInvariantId\":\"539b7a2f-9524-4dbf-9eee-f2e05521df3f\",\n"
-        + "      \"modelUuid\":\"f2daaac6-5017-4e1e-96c8-6a27dfbe1421\",\n"
-        + "      \"modelName\":\"PNF_demo_resource\",\n"
-        + "      \"modelVersion\":\"1.0\"\n"
-        + "    }";
+    private static String TEST_SERVICE_MODEL_INFO = "{\n" + "      \"modelType\":\"service\",\n"
+            + "      \"modelInvariantUuid\":\"539b7a2f-9524-4dbf-9eee-f2e05521df3f\",\n"
+            + "      \"modelInvariantId\":\"539b7a2f-9524-4dbf-9eee-f2e05521df3f\",\n"
+            + "      \"modelUuid\":\"f2daaac6-5017-4e1e-96c8-6a27dfbe1421\",\n"
+            + "      \"modelName\":\"PNF_demo_resource\",\n" + "      \"modelVersion\":\"1.0\"\n" + "    }";
 
     /**
      * Testing model UUID, should be the same as specified in the TEST_SERVICE_MODEL_INFO.
@@ -94,7 +85,7 @@ public class ConfigCheckerDelegateTest {
         List<PnfResourceCustomization> pnfResourceCustomizations = new ArrayList<>();
         pnfResourceCustomizations.add(buildPnfResourceCustomization());
         given(catalogDbClient.getPnfResourceCustomizationByModelUuid(TEST_MODEL_UUID))
-            .willReturn(pnfResourceCustomizations);
+                .willReturn(pnfResourceCustomizations);
         execution.setVariable("testProcessKey", TEST_PROCESS_KEY);
         execution.setVariable(SERVICE_MODEL_INFO, TEST_SERVICE_MODEL_INFO);
     }
@@ -128,12 +119,12 @@ public class ConfigCheckerDelegateTest {
     @Test
     public void testExecution_EmptyPnfResourceCustomization_exceptionThrown() {
         given(catalogDbClient.getPnfResourceCustomizationByModelUuid("f2daaac6-5017-4e1e-96c8-6a27dfbe1421"))
-            .willReturn(Collections.EMPTY_LIST);
+                .willReturn(Collections.EMPTY_LIST);
 
         assertThatThrownBy(() -> configCheckerDelegate.execute(execution)).isInstanceOf(BpmnError.class);
         assertThat(execution.getVariable("WorkflowExceptionErrorMessage")).asString()
-            .contains("Unable to find the PNF resource customizations of model service UUID")
-            .contains("f2daaac6-5017-4e1e-96c8-6a27dfbe1421");
+                .contains("Unable to find the PNF resource customizations of model service UUID")
+                .contains("f2daaac6-5017-4e1e-96c8-6a27dfbe1421");
         assertThat(execution.getVariable("WorkflowException")).isInstanceOf(WorkflowException.class);
     }
 
@@ -142,7 +133,7 @@ public class ConfigCheckerDelegateTest {
         execution.removeVariable("serviceModelInfo");
         assertThatThrownBy(() -> configCheckerDelegate.execute(execution)).isInstanceOf(BpmnError.class);
         assertThat(execution.getVariable("WorkflowExceptionErrorMessage")).asString()
-            .contains("Unable to find parameter serviceModelInfo");
+                .contains("Unable to find parameter serviceModelInfo");
         assertThat(execution.getVariable("WorkflowException")).isInstanceOf(WorkflowException.class);
     }
-}
\ No newline at end of file
+}