@Test
public void testEmrCreateClusterAwsSpecificStepsImpl()
{

    // Create an EMR cluster definition object.
    EmrClusterDefinition emrClusterDefinition = new EmrClusterDefinition();
    emrClusterDefinition.setAccountId(AWS_ACCOUNT_ID);
    emrClusterDefinition.setInstanceDefinitions(new InstanceDefinitions());
    // Create an EMR cluster create request.
    EmrClusterCreateRequest emrClusterCreateRequest =
        new EmrClusterCreateRequest(NAMESPACE, EMR_CLUSTER_DEFINITION_NAME, EMR_CLUSTER_NAME, NO_DRY_RUN, emrClusterDefinition);
    emrClusterCreateRequest.setEmrClusterDefinitionOverride(emrClusterDefinition);
    // Create an EMR cluster alternate key DTO.
    EmrClusterAlternateKeyDto emrClusterAlternateKeyDto = new EmrClusterAlternateKeyDto(NAMESPACE, EMR_CLUSTER_DEFINITION_NAME, EMR_CLUSTER_NAME);
    // Create an EMR parameters DTO.
    EmrParamsDto emrParamsDto =
        new EmrParamsDto(NO_AWS_ACCESS_KEY, NO_AWS_SECRET_KEY, NO_SESSION_TOKEN, HTTP_PROXY_HOST, HTTP_PROXY_PORT, AWS_REGION_NAME_US_EAST_1,
            NO_S3_TRUSTING_ACCOUNT_STAGING_BUCKET_NAME);
    // Create a cluster summary object.
    ClusterSummary clusterSummary = new ClusterSummary();
    clusterSummary.setId(EMR_CLUSTER_ID);
    clusterSummary.setStatus(new ClusterStatus().withState(EMR_CLUSTER_STATUS));
    // Mock the external calls.
    when(emrHelper.isInstanceDefinitionsEmpty(emrClusterDefinition.getInstanceDefinitions())).thenReturn(false);
    when(emrHelper.buildEmrClusterName(emrClusterAlternateKeyDto.getNamespace(), emrClusterAlternateKeyDto.getEmrClusterDefinitionName(),
        emrClusterAlternateKeyDto.getEmrClusterName())).thenReturn(EMR_CLUSTER_NAME);
    when(emrDao.getActiveEmrClusterByNameAndAccountId(EMR_CLUSTER_NAME, emrClusterDefinition.getAccountId(), emrParamsDto)).thenReturn(clusterSummary);
    // Call the method under test.
    emrHelperServiceImpl.emrCreateClusterAwsSpecificSteps(emrClusterCreateRequest, emrClusterDefinition, emrClusterAlternateKeyDto, emrParamsDto);
    // Verify the external calls.
    verify(emrHelper).isInstanceDefinitionsEmpty(emrClusterDefinition.getInstanceDefinitions());
    verify(emrPricingHelper).updateEmrClusterDefinitionWithBestPrice(emrClusterAlternateKeyDto, emrClusterDefinition, emrParamsDto);
    verify(emrHelper).buildEmrClusterName(emrClusterAlternateKeyDto.getNamespace(), emrClusterAlternateKeyDto.getEmrClusterDefinitionName(),
        emrClusterAlternateKeyDto.getEmrClusterName());
    verify(emrDao).getActiveEmrClusterByNameAndAccountId(EMR_CLUSTER_NAME, emrClusterDefinition.getAccountId(), emrParamsDto);
    verifyNoMoreInteractionsHelper();
}