Replaced all tabs with spaces in java and pom.xml
[so.git] / bpmn / so-bpmn-tasks / src / test / java / org / onap / so / bpmn / infrastructure / workflow / tasks / FlowCompletionTasksTest.java
index 3cf003d..1bdde8f 100644 (file)
@@ -26,7 +26,6 @@ import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.InjectMocks;
@@ -37,33 +36,33 @@ import org.springframework.beans.factory.annotation.Autowired;
 
 public class FlowCompletionTasksTest extends BaseTaskTest {
 
-       @InjectMocks
-       protected FlowCompletionTasks flowCompletionTasks = new FlowCompletionTasks();  
+    @InjectMocks
+    protected FlowCompletionTasks flowCompletionTasks = new FlowCompletionTasks();
+
+    @Before
+    public void before() {
+        setRequestContext();
+    }
+
+    @Test
+    public void updateRequestDbStatusComplete_Test() throws Exception {
+        InfraActiveRequests mockedRequest = new InfraActiveRequests();
+        when(requestsDbClient.getInfraActiveRequestbyRequestId(any(String.class))).thenReturn(mockedRequest);
+        doNothing().when(requestsDbClient).updateInfraActiveRequests(any(InfraActiveRequests.class));
+        flowCompletionTasks.updateRequestDbStatus(execution);
+        verify(requestsDbClient, times(1)).updateInfraActiveRequests(any(InfraActiveRequests.class));
+        assertEquals(mockedRequest.getRequestStatus(), "COMPLETE");
+    }
 
-       @Before
-       public void before() {
-               setRequestContext();
-       }
-       
-       @Test
-       public void updateRequestDbStatusComplete_Test() throws Exception{
-               InfraActiveRequests mockedRequest = new InfraActiveRequests();
-               when(requestsDbClient.getInfraActiveRequestbyRequestId(any(String.class))).thenReturn(mockedRequest);
-               doNothing().when(requestsDbClient).updateInfraActiveRequests(any(InfraActiveRequests.class));
-               flowCompletionTasks.updateRequestDbStatus(execution);           
-               verify(requestsDbClient, times(1)).updateInfraActiveRequests(any(InfraActiveRequests.class));
-               assertEquals(mockedRequest.getRequestStatus(), "COMPLETE");
-       }
-       
-       @Test
-       public void updateRequestDbStatusFailed_Test() throws Exception{
-               WorkflowException workflowException = new WorkflowException("testProcessKey", 7000, "Error");
-               execution.setVariable("WorkflowException", workflowException);
-               InfraActiveRequests mockedRequest = new InfraActiveRequests();
-               when(requestsDbClient.getInfraActiveRequestbyRequestId(any(String.class))).thenReturn(mockedRequest);
-               doNothing().when(requestsDbClient).updateInfraActiveRequests(any(InfraActiveRequests.class));
-               flowCompletionTasks.updateRequestDbStatus(execution);           
-               verify(requestsDbClient, times(1)).updateInfraActiveRequests(any(InfraActiveRequests.class));
-               assertEquals(mockedRequest.getRequestStatus(), "FAILED");
-       }
+    @Test
+    public void updateRequestDbStatusFailed_Test() throws Exception {
+        WorkflowException workflowException = new WorkflowException("testProcessKey", 7000, "Error");
+        execution.setVariable("WorkflowException", workflowException);
+        InfraActiveRequests mockedRequest = new InfraActiveRequests();
+        when(requestsDbClient.getInfraActiveRequestbyRequestId(any(String.class))).thenReturn(mockedRequest);
+        doNothing().when(requestsDbClient).updateInfraActiveRequests(any(InfraActiveRequests.class));
+        flowCompletionTasks.updateRequestDbStatus(execution);
+        verify(requestsDbClient, times(1)).updateInfraActiveRequests(any(InfraActiveRequests.class));
+        assertEquals(mockedRequest.getRequestStatus(), "FAILED");
+    }
 }