@Test public void testRemoveLineBreaks_whenBootstrapActionStringIsEmpty(){ String bootstrapStringWithBreaks = ""; String expectedString = ""; String resultBootstrapString = emrClient.removeLineBreaks( bootstrapStringWithBreaks ); Assert.assertEquals( expectedString, resultBootstrapString ); }
@VisibleForTesting public static String removeLineBreaks( String multiLineFieldValue ) { if ( StringUtil.isEmpty( multiLineFieldValue ) ) { return multiLineFieldValue; } return multiLineFieldValue.replaceAll( "\\s+", " " ).trim(); }
EmrClientImpl implements EmrClient { @VisibleForTesting public static String removeLineBreaks( String multiLineFieldValue ) { if ( StringUtil.isEmpty( multiLineFieldValue ) ) { return multiLineFieldValue; } return multiLineFieldValue.replaceAll( "\\s+", " " ).trim(); } }
EmrClientImpl implements EmrClient { @VisibleForTesting public static String removeLineBreaks( String multiLineFieldValue ) { if ( StringUtil.isEmpty( multiLineFieldValue ) ) { return multiLineFieldValue; } return multiLineFieldValue.replaceAll( "\\s+", " " ).trim(); } EmrClientImpl( AmazonElasticMapReduce emrClient ); }
EmrClientImpl implements EmrClient { @VisibleForTesting public static String removeLineBreaks( String multiLineFieldValue ) { if ( StringUtil.isEmpty( multiLineFieldValue ) ) { return multiLineFieldValue; } return multiLineFieldValue.replaceAll( "\\s+", " " ).trim(); } EmrClientImpl( AmazonElasticMapReduce emrClient ); @Override void runJobFlow( String stagingS3FileUrl, String stagingS3BucketUrl, String stepType, String mainClass,
                          String bootstrapActions,
                          AbstractAmazonJobEntry jobEntry
  ); @Override String getHadoopJobFlowId(); @Override String getStepId(); @Override void addStepToExistingJobFlow( String stagingS3FileUrl, String stagingS3BucketUrl, String stepType,
                                        String mainClass,
                                        AbstractAmazonJobEntry jobEntry ); @Override boolean isClusterRunning(); @Override boolean isStepRunning(); @Override boolean isRunning(); @Override String getCurrentClusterState(); @Override String getCurrentStepState(); @Override boolean isClusterTerminated(); @Override boolean isStepFailed(); @Override boolean isStepNotSuccess(); @VisibleForTesting static String removeLineBreaks( String multiLineFieldValue ); @Override boolean stopSteps(); @Override String getJobFlowLogUri(); }
EmrClientImpl implements EmrClient { @VisibleForTesting public static String removeLineBreaks( String multiLineFieldValue ) { if ( StringUtil.isEmpty( multiLineFieldValue ) ) { return multiLineFieldValue; } return multiLineFieldValue.replaceAll( "\\s+", " " ).trim(); } EmrClientImpl( AmazonElasticMapReduce emrClient ); @Override void runJobFlow( String stagingS3FileUrl, String stagingS3BucketUrl, String stepType, String mainClass,
                          String bootstrapActions,
                          AbstractAmazonJobEntry jobEntry
  ); @Override String getHadoopJobFlowId(); @Override String getStepId(); @Override void addStepToExistingJobFlow( String stagingS3FileUrl, String stagingS3BucketUrl, String stepType,
                                        String mainClass,
                                        AbstractAmazonJobEntry jobEntry ); @Override boolean isClusterRunning(); @Override boolean isStepRunning(); @Override boolean isRunning(); @Override String getCurrentClusterState(); @Override String getCurrentStepState(); @Override boolean isClusterTerminated(); @Override boolean isStepFailed(); @Override boolean isStepNotSuccess(); @VisibleForTesting static String removeLineBreaks( String multiLineFieldValue ); @Override boolean stopSteps(); @Override String getJobFlowLogUri();  }