test_class.declarator: awsServiceHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private AwsServiceHelper awsServiceHelper;
test_class.type: AwsServiceHelper
test_class.var_name: awsServiceHelper
test_class.declarator: configurationHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ConfigurationHelper configurationHelper;
test_class.type: ConfigurationHelper
test_class.var_name: configurationHelper
test_class.declarator: emrClusterDefinitionDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private EmrClusterDefinitionDaoHelper emrClusterDefinitionDaoHelper;
test_class.type: EmrClusterDefinitionDaoHelper
test_class.var_name: emrClusterDefinitionDaoHelper
test_class.declarator: emrClusterDefinitionHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private EmrClusterDefinitionHelper emrClusterDefinitionHelper;
test_class.type: EmrClusterDefinitionHelper
test_class.var_name: emrClusterDefinitionHelper
test_class.declarator: emrDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private EmrDao emrDao;
test_class.type: EmrDao
test_class.var_name: emrDao
test_class.declarator: emrHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private EmrHelper emrHelper;
test_class.type: EmrHelper
test_class.var_name: emrHelper
test_class.declarator: emrHelperServiceImpl
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private EmrHelperServiceImpl emrHelperServiceImpl;
test_class.type: EmrHelperServiceImpl
test_class.var_name: emrHelperServiceImpl
test_class.declarator: emrPricingHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private EmrPricingHelper emrPricingHelper;
test_class.type: EmrPricingHelper
test_class.var_name: emrPricingHelper
test_class.declarator: herdDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private HerdDao herdDao;
test_class.type: HerdDao
test_class.var_name: herdDao
test_class.declarator: namespaceDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private NamespaceDaoHelper namespaceDaoHelper;
test_class.type: NamespaceDaoHelper
test_class.var_name: namespaceDaoHelper
test_class.declarator: namespaceIamRoleAuthorizationHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private NamespaceIamRoleAuthorizationHelper namespaceIamRoleAuthorizationHelper;
test_class.type: NamespaceIamRoleAuthorizationHelper
test_class.var_name: namespaceIamRoleAuthorizationHelper
test_class.declarator: xmlHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private XmlHelper xmlHelper;
test_class.type: XmlHelper
test_class.var_name: xmlHelper
test_class.declarator: jsonHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private JsonHelper jsonHelper;
test_class.type: JsonHelper
test_class.var_name: jsonHelper
test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/impl/EmrHelperServiceImplTest.java
test_class.identifier: EmrHelperServiceImplTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void testEmrPreCreateClusterStepsImpl() throws Exception
      {
          // Create an override for EMR cluster definition.
          EmrClusterDefinition emrClusterDefinitionOverride = new EmrClusterDefinition();
          emrClusterDefinitionOverride.setAccountId(AWS_ACCOUNT_ID_2);
          emrClusterDefinitionOverride.setAdditionalInfo(STRING_VALUE_2);
  
          // Create an EMR cluster create request.
          EmrClusterCreateRequest emrClusterCreateRequest =
              new EmrClusterCreateRequest(NAMESPACE, EMR_CLUSTER_DEFINITION_NAME, EMR_CLUSTER_NAME, NO_DRY_RUN, emrClusterDefinitionOverride);
  
          // Create an EMR cluster alternate key DTO.
          EmrClusterAlternateKeyDto emrClusterAlternateKeyDto = new EmrClusterAlternateKeyDto(NAMESPACE, EMR_CLUSTER_DEFINITION_NAME, EMR_CLUSTER_NAME);
  
          // Create an EMR cluster definition key.
          EmrClusterDefinitionKey emrClusterDefinitionKey = new EmrClusterDefinitionKey(NAMESPACE, EMR_CLUSTER_DEFINITION_NAME);
  
          // Create a namespace entity.
          NamespaceEntity namespaceEntity = new NamespaceEntity();
          namespaceEntity.setCode(NAMESPACE);
  
          // Create an EMR cluster definition entity
          EmrClusterDefinitionEntity emrClusterDefinitionEntity = new EmrClusterDefinitionEntity();
          emrClusterDefinitionEntity.setNamespace(namespaceEntity);
          emrClusterDefinitionEntity.setConfiguration(EMR_CLUSTER_CONFIGURATION_XML_1);
  
          // Create an original EMR cluster definition.
          EmrClusterDefinition originalEmrClusterDefinition = new EmrClusterDefinition();
          originalEmrClusterDefinition.setAdditionalInfo(STRING_VALUE);
          originalEmrClusterDefinition.setAccountId(AWS_ACCOUNT_ID);
  
          // Create a final (updated) EMR cluster definition.
          EmrClusterDefinition finalEmrClusterDefinition = new EmrClusterDefinition();
          finalEmrClusterDefinition.setServiceIamRole(SERVICE_IAM_ROLE);
          finalEmrClusterDefinition.setEc2NodeIamProfileName(EC2_NODE_IAM_PROFILE_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,
                  S3_TRUSTING_ACCOUNT_STAGING_BUCKET_NAME);
  
          // Mock the external calls.
          when(emrClusterDefinitionDaoHelper.getEmrClusterDefinitionEntity(emrClusterDefinitionKey)).thenReturn(emrClusterDefinitionEntity);
          when(xmlHelper.unmarshallXmlToObject(EmrClusterDefinition.class, EMR_CLUSTER_CONFIGURATION_XML_1)).thenReturn(originalEmrClusterDefinition);
          when(emrHelper.getEmrParamsDtoByAccountId(AWS_ACCOUNT_ID_2)).thenReturn(emrParamsDto);
          when(xmlHelper.objectToXml(originalEmrClusterDefinition)).thenReturn(EMR_CLUSTER_CONFIGURATION_XML_2);
          when(configurationHelper.getProperty(ConfigurationValue.S3_STAGING_RESOURCE_LOCATION))
              .thenReturn((String) ConfigurationValue.S3_STAGING_RESOURCE_LOCATION.getDefaultValue());
          when(emrHelper.getS3StagingLocation(S3_TRUSTING_ACCOUNT_STAGING_BUCKET_NAME)).thenReturn(S3_STAGING_LOCATION);
          when(xmlHelper.unmarshallXmlToObject(EmrClusterDefinition.class, EMR_CLUSTER_CONFIGURATION_XML_2)).thenReturn(finalEmrClusterDefinition);
  
          // Call the method under test.
          emrHelperServiceImpl.emrPreCreateClusterSteps(emrClusterAlternateKeyDto, emrClusterCreateRequest);
  
          // Verify the external calls.
          verify(emrClusterDefinitionDaoHelper).getEmrClusterDefinitionEntity(emrClusterDefinitionKey);
          verify(xmlHelper).unmarshallXmlToObject(EmrClusterDefinition.class, EMR_CLUSTER_CONFIGURATION_XML_1);
          verify(emrHelper).getEmrParamsDtoByAccountId(AWS_ACCOUNT_ID_2);
          verify(xmlHelper).objectToXml(originalEmrClusterDefinition);
          verify(configurationHelper).getProperty(ConfigurationValue.S3_STAGING_RESOURCE_LOCATION);
          verify(emrHelper).getS3StagingLocation(S3_TRUSTING_ACCOUNT_STAGING_BUCKET_NAME);
          verify(xmlHelper).unmarshallXmlToObject(EmrClusterDefinition.class, EMR_CLUSTER_CONFIGURATION_XML_2);
          verify(emrClusterDefinitionHelper).validateEmrClusterDefinitionConfiguration(finalEmrClusterDefinition);
          verify(namespaceIamRoleAuthorizationHelper).checkPermissions(namespaceEntity, SERVICE_IAM_ROLE, EC2_NODE_IAM_PROFILE_NAME);
          verifyNoMoreInteractionsHelper();
      }
test_case.class_method_signature: EmrHelperServiceImplTest.testEmrPreCreateClusterStepsImpl()
test_case.full_signature: @Test public void testEmrPreCreateClusterStepsImpl()
test_case.identifier: testEmrPreCreateClusterStepsImpl
test_case.invocations: setAccountId setAdditionalInfo setCode setNamespace setConfiguration setAdditionalInfo setAccountId setServiceIamRole setEc2NodeIamProfileName thenReturn when getEmrClusterDefinitionEntity thenReturn when unmarshallXmlToObject thenReturn when getEmrParamsDtoByAccountId thenReturn when objectToXml thenReturn when getProperty getDefaultValue thenReturn when getS3StagingLocation thenReturn when unmarshallXmlToObject emrPreCreateClusterSteps getEmrClusterDefinitionEntity verify unmarshallXmlToObject verify getEmrParamsDtoByAccountId verify objectToXml verify getProperty verify getS3StagingLocation verify unmarshallXmlToObject verify validateEmrClusterDefinitionConfiguration verify checkPermissions verify verifyNoMoreInteractionsHelper
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEmrPreCreateClusterStepsImpl()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(EmrHelperServiceImpl.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(EmrHelperServiceImpl.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: awsServiceHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private AwsServiceHelper awsServiceHelper;
focal_class.type: AwsServiceHelper
focal_class.var_name: awsServiceHelper
focal_class.declarator: configurationHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ConfigurationHelper configurationHelper;
focal_class.type: ConfigurationHelper
focal_class.var_name: configurationHelper
focal_class.declarator: emrClusterDefinitionDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private EmrClusterDefinitionDaoHelper emrClusterDefinitionDaoHelper;
focal_class.type: EmrClusterDefinitionDaoHelper
focal_class.var_name: emrClusterDefinitionDaoHelper
focal_class.declarator: emrClusterDefinitionHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private EmrClusterDefinitionHelper emrClusterDefinitionHelper;
focal_class.type: EmrClusterDefinitionHelper
focal_class.var_name: emrClusterDefinitionHelper
focal_class.declarator: emrDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private EmrDao emrDao;
focal_class.type: EmrDao
focal_class.var_name: emrDao
focal_class.declarator: emrHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private EmrHelper emrHelper;
focal_class.type: EmrHelper
focal_class.var_name: emrHelper
focal_class.declarator: emrPricingHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private EmrPricingHelper emrPricingHelper;
focal_class.type: EmrPricingHelper
focal_class.var_name: emrPricingHelper
focal_class.declarator: herdDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private HerdDao herdDao;
focal_class.type: HerdDao
focal_class.var_name: herdDao
focal_class.declarator: jsonHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private JsonHelper jsonHelper;
focal_class.type: JsonHelper
focal_class.var_name: jsonHelper
focal_class.declarator: namespaceDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private NamespaceDaoHelper namespaceDaoHelper;
focal_class.type: NamespaceDaoHelper
focal_class.var_name: namespaceDaoHelper
focal_class.declarator: namespaceIamRoleAuthorizationHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private NamespaceIamRoleAuthorizationHelper namespaceIamRoleAuthorizationHelper;
focal_class.type: NamespaceIamRoleAuthorizationHelper
focal_class.var_name: namespaceIamRoleAuthorizationHelper
focal_class.declarator: xmlHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private XmlHelper xmlHelper;
focal_class.type: XmlHelper
focal_class.var_name: xmlHelper
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/impl/EmrHelperServiceImpl.java
focal_class.identifier: EmrHelperServiceImpl
focal_class.interfaces: implements EmrHelperService
focal_class.class_method_signature: EmrHelperServiceImpl.emrCreateClusterAwsSpecificSteps(EmrClusterCreateRequest emrClusterCreateRequest, EmrClusterDefinition emrClusterDefinition,
          EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrParamsDto emrParamsDto)
focal_class.full_signature: @Override @Transactional(propagation = Propagation.NOT_SUPPORTED) public EmrClusterCreateDto emrCreateClusterAwsSpecificSteps(EmrClusterCreateRequest emrClusterCreateRequest, EmrClusterDefinition emrClusterDefinition,
          EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrParamsDto emrParamsDto)
focal_class.identifier: emrCreateClusterAwsSpecificSteps
focal_class.modifiers: @Override @Transactional(propagation = Propagation.NOT_SUPPORTED) public
focal_class.parameters: (EmrClusterCreateRequest emrClusterCreateRequest, EmrClusterDefinition emrClusterDefinition,
          EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrParamsDto emrParamsDto)
focal_class.return: EmrClusterCreateDto
focal_class.signature: EmrClusterCreateDto emrCreateClusterAwsSpecificSteps(EmrClusterCreateRequest emrClusterCreateRequest, EmrClusterDefinition emrClusterDefinition,
          EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrParamsDto emrParamsDto)
focal_class.class_method_signature: EmrHelperServiceImpl.emrPreCreateClusterSteps(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterCreateRequest emrClusterCreateRequest)
focal_class.full_signature: @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public EmrClusterPreCreateDto emrPreCreateClusterSteps(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterCreateRequest emrClusterCreateRequest)
focal_class.identifier: emrPreCreateClusterSteps
focal_class.modifiers: @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public
focal_class.parameters: (EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterCreateRequest emrClusterCreateRequest)
focal_class.return: EmrClusterPreCreateDto
focal_class.signature: EmrClusterPreCreateDto emrPreCreateClusterSteps(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterCreateRequest emrClusterCreateRequest)
focal_class.class_method_signature: EmrHelperServiceImpl.logEmrClusterCreation(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterDefinition emrClusterDefinition, String clusterId)
focal_class.full_signature: @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public void logEmrClusterCreation(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterDefinition emrClusterDefinition, String clusterId)
focal_class.identifier: logEmrClusterCreation
focal_class.modifiers: @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public
focal_class.parameters: (EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterDefinition emrClusterDefinition, String clusterId)
focal_class.return: void
focal_class.signature: void logEmrClusterCreation(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterDefinition emrClusterDefinition, String clusterId)
focal_class.class_method_signature: EmrHelperServiceImpl.emrCreateClusterAwsSpecificStepsImpl(EmrClusterCreateRequest request, EmrClusterDefinition emrClusterDefinition,
          EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrParamsDto emrParamsDto)
focal_class.full_signature:  EmrClusterCreateDto emrCreateClusterAwsSpecificStepsImpl(EmrClusterCreateRequest request, EmrClusterDefinition emrClusterDefinition,
          EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrParamsDto emrParamsDto)
focal_class.identifier: emrCreateClusterAwsSpecificStepsImpl
focal_class.parameters: (EmrClusterCreateRequest request, EmrClusterDefinition emrClusterDefinition,
          EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrParamsDto emrParamsDto)
focal_class.return: EmrClusterCreateDto
focal_class.signature: EmrClusterCreateDto emrCreateClusterAwsSpecificStepsImpl(EmrClusterCreateRequest request, EmrClusterDefinition emrClusterDefinition,
          EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrParamsDto emrParamsDto)
focal_class.class_method_signature: EmrHelperServiceImpl.emrPreCreateClusterStepsImpl(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterCreateRequest request)
focal_class.full_signature:  EmrClusterPreCreateDto emrPreCreateClusterStepsImpl(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterCreateRequest request)
focal_class.identifier: emrPreCreateClusterStepsImpl
focal_class.parameters: (EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterCreateRequest request)
focal_class.return: EmrClusterPreCreateDto
focal_class.signature: EmrClusterPreCreateDto emrPreCreateClusterStepsImpl(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterCreateRequest request)
focal_class.class_method_signature: EmrHelperServiceImpl.logEmrClusterCreationImpl(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterDefinition emrClusterDefinition, String clusterId)
focal_class.full_signature:  void logEmrClusterCreationImpl(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterDefinition emrClusterDefinition, String clusterId)
focal_class.identifier: logEmrClusterCreationImpl
focal_class.parameters: (EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterDefinition emrClusterDefinition, String clusterId)
focal_class.return: void
focal_class.signature: void logEmrClusterCreationImpl(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterDefinition emrClusterDefinition, String clusterId)
focal_class.class_method_signature: EmrHelperServiceImpl.getS3ManagedReplaceString()
focal_class.full_signature: private String getS3ManagedReplaceString()
focal_class.identifier: getS3ManagedReplaceString
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getS3ManagedReplaceString()
focal_class.class_method_signature: EmrHelperServiceImpl.overrideEmrClusterDefinition(EmrClusterDefinition emrClusterDefinition, EmrClusterDefinition emrClusterDefinitionOverride)
focal_class.full_signature: @SuppressWarnings("PMD.CyclomaticComplexity") // Method is not complex. It's just very repetitive. protected void overrideEmrClusterDefinition(EmrClusterDefinition emrClusterDefinition, EmrClusterDefinition emrClusterDefinitionOverride)
focal_class.identifier: overrideEmrClusterDefinition
focal_class.modifiers: @SuppressWarnings("PMD.CyclomaticComplexity") // Method is not complex. It's just very repetitive. protected
focal_class.parameters: (EmrClusterDefinition emrClusterDefinition, EmrClusterDefinition emrClusterDefinitionOverride)
focal_class.return: void
focal_class.signature: void overrideEmrClusterDefinition(EmrClusterDefinition emrClusterDefinition, EmrClusterDefinition emrClusterDefinitionOverride)
focal_class.class_method_signature: EmrHelperServiceImpl.updateEmrClusterDefinitionWithValidInstanceFleetSubnets(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterDefinition emrClusterDefinition,
          AwsParamsDto awsParamsDto)
focal_class.full_signature:  void updateEmrClusterDefinitionWithValidInstanceFleetSubnets(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterDefinition emrClusterDefinition,
          AwsParamsDto awsParamsDto)
focal_class.identifier: updateEmrClusterDefinitionWithValidInstanceFleetSubnets
focal_class.parameters: (EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterDefinition emrClusterDefinition,
          AwsParamsDto awsParamsDto)
focal_class.return: void
focal_class.signature: void updateEmrClusterDefinitionWithValidInstanceFleetSubnets(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterDefinition emrClusterDefinition,
          AwsParamsDto awsParamsDto)
focal_method.body: EmrClusterPreCreateDto emrPreCreateClusterStepsImpl(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterCreateRequest request) throws Exception
      {
          // Get the EMR cluster definition and ensure it exists.
          EmrClusterDefinitionEntity emrClusterDefinitionEntity = emrClusterDefinitionDaoHelper.getEmrClusterDefinitionEntity(
              new EmrClusterDefinitionKey(emrClusterAlternateKeyDto.getNamespace(), emrClusterAlternateKeyDto.getEmrClusterDefinitionName()));
  
          // Get EMR cluster definition XML stored in the database.
          String originalClusterDefinitionXml = emrClusterDefinitionEntity.getConfiguration();
  
          // Unmarshal definition xml into JAXB object.
          EmrClusterDefinition emrClusterDefinition = xmlHelper.unmarshallXmlToObject(EmrClusterDefinition.class, originalClusterDefinitionXml);
  
          // Perform override if override is set.
          overrideEmrClusterDefinition(emrClusterDefinition, request.getEmrClusterDefinitionOverride());
  
          // Get account ID.
          String accountId = emrClusterDefinition.getAccountId();
  
          // Get AWS parameters.
          EmrParamsDto emrParamsDto = emrHelper.getEmrParamsDtoByAccountId(accountId);
  
          // Replace all S3 managed location variables in EMR cluster definition XML.
          String overriddenEmrClusterDefinitionXml = xmlHelper.objectToXml(emrClusterDefinition);
          String replacedEmrClusterDefinitionXml = overriddenEmrClusterDefinitionXml
              .replaceAll(getS3ManagedReplaceString(), emrHelper.getS3StagingLocation(emrParamsDto.getTrustingAccountStagingBucketName()));
          emrClusterDefinition = xmlHelper.unmarshallXmlToObject(EmrClusterDefinition.class, replacedEmrClusterDefinitionXml);
  
          // Perform the EMR cluster definition configuration validation.
          emrClusterDefinitionHelper.validateEmrClusterDefinitionConfiguration(emrClusterDefinition);
  
          // Check permissions.
          namespaceIamRoleAuthorizationHelper.checkPermissions(emrClusterDefinitionEntity.getNamespace(), emrClusterDefinition.getServiceIamRole(),
              emrClusterDefinition.getEc2NodeIamProfileName());
  
          // Create and return EMR cluster pre-create DTO.
          return new EmrClusterPreCreateDto(emrClusterDefinition, emrParamsDto);
      }
focal_method.class_method_signature: EmrHelperServiceImpl.emrPreCreateClusterStepsImpl(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterCreateRequest request)
focal_method.full_signature:  EmrClusterPreCreateDto emrPreCreateClusterStepsImpl(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterCreateRequest request)
focal_method.identifier: emrPreCreateClusterStepsImpl
focal_method.invocations: getEmrClusterDefinitionEntity getNamespace getEmrClusterDefinitionName getConfiguration unmarshallXmlToObject overrideEmrClusterDefinition getEmrClusterDefinitionOverride getAccountId getEmrParamsDtoByAccountId objectToXml replaceAll getS3ManagedReplaceString getS3StagingLocation getTrustingAccountStagingBucketName unmarshallXmlToObject validateEmrClusterDefinitionConfiguration checkPermissions getNamespace getServiceIamRole getEc2NodeIamProfileName
focal_method.parameters: (EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterCreateRequest request)
focal_method.return: EmrClusterPreCreateDto
focal_method.signature: EmrClusterPreCreateDto emrPreCreateClusterStepsImpl(EmrClusterAlternateKeyDto emrClusterAlternateKeyDto, EmrClusterCreateRequest request)