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 / aai / AAIDeleteServiceInstanceTest.java
index a540a6d..1aca331 100644 (file)
@@ -26,7 +26,6 @@ import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
-
 import org.camunda.bpm.engine.delegate.BpmnError;
 import org.camunda.bpm.engine.delegate.DelegateExecution;
 import org.junit.Before;
@@ -38,47 +37,47 @@ import org.mockito.MockitoAnnotations;
 import org.onap.so.client.aai.AAIResourcesClient;
 import org.onap.so.client.aai.entities.uri.AAIResourceUri;
 
-public class AAIDeleteServiceInstanceTest  {
-       private AAIDeleteServiceInstance aaiDeleteServiceInstance;
-       @Mock
-       private DelegateExecution execution;
-       
-       @Mock
-       private AAIResourcesClient aaiResourcesClient;
-       
-       @Rule
-       public ExpectedException expectedException = ExpectedException.none();
-       
-       
-       @Before
-       public void before() {
-               MockitoAnnotations.initMocks(this);
-               
-               aaiDeleteServiceInstance = new AAIDeleteServiceInstance();
-               aaiDeleteServiceInstance.setAaiClient(aaiResourcesClient);
-       }
-       
-       @Test
-       public void executeTest() throws Exception {
-               doReturn("serviceInstanceId").when(execution).getVariable("serviceInstanceId");
-               doNothing().when(aaiResourcesClient).delete(isA(AAIResourceUri.class));
-               doNothing().when(execution).setVariable(isA(String.class), isA(Boolean.class));
-               
-               aaiDeleteServiceInstance.execute(execution);
-               
-               verify(execution, times(1)).getVariable("serviceInstanceId");
-               verify(aaiResourcesClient, times(1)).delete(isA(AAIResourceUri.class));
-               verify(execution, times(1)).setVariable("GENDS_SuccessIndicator", true);
-       }
-       
-       @Test
-       public void executeExceptionTest() throws Exception {
-               expectedException.expect(BpmnError.class);
-               
-               doReturn("testProcessKey").when(execution).getVariable("testProcessKey");
-               doReturn("serviceInstanceId").when(execution).getVariable("serviceInstanceId");
-               doThrow(RuntimeException.class).when(aaiResourcesClient).delete(isA(AAIResourceUri.class));
-               
-               aaiDeleteServiceInstance.execute(execution);
-       }
+public class AAIDeleteServiceInstanceTest {
+    private AAIDeleteServiceInstance aaiDeleteServiceInstance;
+    @Mock
+    private DelegateExecution execution;
+
+    @Mock
+    private AAIResourcesClient aaiResourcesClient;
+
+    @Rule
+    public ExpectedException expectedException = ExpectedException.none();
+
+
+    @Before
+    public void before() {
+        MockitoAnnotations.initMocks(this);
+
+        aaiDeleteServiceInstance = new AAIDeleteServiceInstance();
+        aaiDeleteServiceInstance.setAaiClient(aaiResourcesClient);
+    }
+
+    @Test
+    public void executeTest() throws Exception {
+        doReturn("serviceInstanceId").when(execution).getVariable("serviceInstanceId");
+        doNothing().when(aaiResourcesClient).delete(isA(AAIResourceUri.class));
+        doNothing().when(execution).setVariable(isA(String.class), isA(Boolean.class));
+
+        aaiDeleteServiceInstance.execute(execution);
+
+        verify(execution, times(1)).getVariable("serviceInstanceId");
+        verify(aaiResourcesClient, times(1)).delete(isA(AAIResourceUri.class));
+        verify(execution, times(1)).setVariable("GENDS_SuccessIndicator", true);
+    }
+
+    @Test
+    public void executeExceptionTest() throws Exception {
+        expectedException.expect(BpmnError.class);
+
+        doReturn("testProcessKey").when(execution).getVariable("testProcessKey");
+        doReturn("serviceInstanceId").when(execution).getVariable("serviceInstanceId");
+        doThrow(RuntimeException.class).when(aaiResourcesClient).delete(isA(AAIResourceUri.class));
+
+        aaiDeleteServiceInstance.execute(execution);
+    }
 }