use of com.amazonaws.services.elasticmapreduce.model.DescribeStepRequest in project herd by FINRAOS.
the class EmrDaoTest method getClusterStepAssertCallsDescribeStepAndReturnsStep.
@Test
public void getClusterStepAssertCallsDescribeStepAndReturnsStep() throws Exception {
String clusterId = "clusterId";
String stepId = "stepId";
Step expectedStep = new Step();
when(mockEmrOperations.describeStepRequest(any(), any())).then(new Answer<DescribeStepResult>() {
@Override
public DescribeStepResult answer(InvocationOnMock invocation) throws Throwable {
DescribeStepRequest describeStepRequest = invocation.getArgument(1);
assertEquals(clusterId, describeStepRequest.getClusterId());
assertEquals(stepId, describeStepRequest.getStepId());
DescribeStepResult describeStepResult = new DescribeStepResult();
describeStepResult.setStep(expectedStep);
return describeStepResult;
}
});
assertEquals(expectedStep, emrDao.getClusterStep(clusterId, stepId, new AwsParamsDto()));
}
Aggregations