@Test public void formatDate_should_return_formatted_date_in_english_locale() { final Locale initialDefaultLocale = Locale.getDefault(); try { Locale.setDefault(Locale.FRENCH); final String formattedDate = cut.formatDate(THE_APRIL_25TH_2017_AT_12_H_57_MIN_56_S); assertThat(formattedDate).isEqualTo("Apr 25, 2017 - 12:57"); } finally { Locale.setDefault(initialDefaultLocale); } }
String formatDate(Date date) { if (date == null) { return StringUtils.EMPTY; } return new SimpleDateFormat("MMM d, yyyy - HH:mm", Locale.US).format(date); }
QualityEmailService { String formatDate(Date date) { if (date == null) { return StringUtils.EMPTY; } return new SimpleDateFormat("MMM d, yyyy - HH:mm", Locale.US).format(date); } }
QualityEmailService { String formatDate(Date date) { if (date == null) { return StringUtils.EMPTY; } return new SimpleDateFormat("MMM d, yyyy - HH:mm", Locale.US).format(date); }  }
QualityEmailService { String formatDate(Date date) { if (date == null) { return StringUtils.EMPTY; } return new SimpleDateFormat("MMM d, yyyy - HH:mm", Locale.US).format(date); }  @Transactional(readOnly = true, noRollbackFor = Exception.class) void sendQualityEmail(long projectId, long executionId); }
QualityEmailService { String formatDate(Date date) { if (date == null) { return StringUtils.EMPTY; } return new SimpleDateFormat("MMM d, yyyy - HH:mm", Locale.US).format(date); }  @Transactional(readOnly = true, noRollbackFor = Exception.class) void sendQualityEmail(long projectId, long executionId);  }