EmrHelper extends AwsHelper { public boolean isInstanceDefinitionsEmpty(InstanceDefinitions instanceDefinitions) { return (instanceDefinitions == null || (instanceDefinitions.getMasterInstances() == null && instanceDefinitions.getCoreInstances() == null && instanceDefinitions.getTaskInstances() == null)); }  String buildEmrClusterName(String namespaceCd, String emrDefinitionName, String clusterName); String getActiveEmrClusterId(String emrClusterId, String emrClusterName, String accountId); EmrParamsDto getEmrParamsDtoByAccountId(String accountId); EmrDao getEmrDao(); void setEmrDao(EmrDao emrDao); StepConfig getEmrHadoopJarStepConfig(String stepName, String jarLocation, String mainClass, List<String> scriptArguments, Boolean isContinueOnError); String getS3StagingLocation(String trustingAccountStagingBucketName); boolean isActiveEmrState(String status); boolean isInstanceDefinitionsEmpty(InstanceDefinitions instanceDefinitions); List<EmrClusterInstanceFleet> buildEmrClusterInstanceFleetFromAwsResult(ListInstanceFleetsResult awsInstanceFleetsResult);  }
@Test public void testIsInstanceDefinitionsEmpty() { assertTrue(emrHelper.isInstanceDefinitionsEmpty(null)); assertTrue(emrHelper.isInstanceDefinitionsEmpty(new InstanceDefinitions(null, null, null))); assertFalse(emrHelper.isInstanceDefinitionsEmpty(new InstanceDefinitions(new MasterInstanceDefinition(), null, null))); assertFalse(emrHelper.isInstanceDefinitionsEmpty(new InstanceDefinitions(null, new InstanceDefinition(), null))); assertFalse(emrHelper.isInstanceDefinitionsEmpty(new InstanceDefinitions(null, null, new InstanceDefinition()))); }