Модульный тестовый пример проходит, когда он является awsStepFunctionsAsyncClient.startExecutionAsyn c, но не работает для awsStepFunctionsAsyncClient.startExecution
@Test
public void testStateMachineExecutionSuccess(){
IngestionWorkflowMetadata executionInputs = prepareStateMachineInputs();
try{
when(awsStepFunctionsAsyncClient.startExecution(any(StartExecutionRequest.class))).thenReturn(startExecutionResult);
stepFunctionUtility.startExecution(executionInputs);
ArgumentCaptor<StartExecutionRequest> requestCaptor = ArgumentCaptor.forClass(StartExecutionRequest.class);
verify(awsStepFunctionsAsyncClient, times(1)).startExecution(requestCaptor.capture());
Assert.assertEquals(EXPECTED_STEP_FUNCTION_ARN, requestCaptor.getValue().getStateMachineArn());
Assert.assertEquals(EXECUTION_ID, requestCaptor.getValue().getName());
Assert.assertEquals(INPUT_STRING, requestCaptor.getValue().getInput());
} catch (Exception e){ failTheTest(); }
}