summaryrefslogtreecommitdiffstats
path: root/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp
diff options
context:
space:
mode:
Diffstat (limited to 'appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp')
-rw-r--r--appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutionTask.java3
-rw-r--r--appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutor.java4
2 files changed, 3 insertions, 4 deletions
diff --git a/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutionTask.java b/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutionTask.java
index 0504c3998..cd0167934 100644
--- a/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutionTask.java
+++ b/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutionTask.java
@@ -132,8 +132,7 @@ public class TestCommandExecutionTask {
@Test
public void testFactory(){
- CommandTask task;
- task = factory.getExecutionTask("Configure");
+ CommandTask<? extends CommandRequest> task = factory.getExecutionTask("Configure");
assertEquals(LCMCommandTask.class,task.getClass() );
task = factory.getExecutionTask("Sync");
assertEquals(LCMReadonlyCommandTask.class,task.getClass() );
diff --git a/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutor.java b/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutor.java
index 473e14e88..43e9357b1 100644
--- a/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutor.java
+++ b/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/test/java/org/openecomp/appc/executor/TestCommandExecutor.java
@@ -78,8 +78,8 @@ public class TestCommandExecutor {
commandExecutor.setExecutionQueueService(executionQueueService);
LCMCommandTask lcmCommandTask = Mockito.mock(LCMCommandTask.class);
LCMReadonlyCommandTask LCMReadonlyCommandTask = Mockito.mock(LCMReadonlyCommandTask.class);
- Mockito.when(executionTaskFactory.getExecutionTask("Configure")).thenReturn(lcmCommandTask);
- Mockito.when(executionTaskFactory.getExecutionTask("Sync")).thenReturn(LCMReadonlyCommandTask);
+ Mockito.doReturn(lcmCommandTask).when(executionTaskFactory).getExecutionTask("Configure");
+ Mockito.doReturn(LCMReadonlyCommandTask).when(executionTaskFactory).getExecutionTask("Sync");
// Mockito.when(executionQueueService.putMessage((Runnable) Mockito.anyObject(),Mockito.anyLong(),(TimeUnit)Mockito.anyObject())).thenReturn(true);
}