### Question:
DateConverter extends ClassicConverter { public String convert(ILoggingEvent le) { long timestamp = le.getTimeStamp(); return cachingDateFormatter.format(timestamp); }  void start(); String convert(ILoggingEvent le);  }### Answer:
@Test public void convertsDateWithSpecifiedLocaleLang() { assertEquals(FRENCH_TIME_UTC, convert(_timestamp, DATETIME_PATTERN, "UTC", "fr")); }
@Test public void convertsDateWithSpecifiedLocaleLangAndCountry() { assertEquals(CHINESE_TIME_UTC, convert(_timestamp, DATETIME_PATTERN, "UTC", "zh,CN")); }
@Test public void convertsDateWithCurrentTimeZoneByDefault() { assertEquals(formatDate(TimeZone.getDefault().getID()), convert(_timestamp, DATETIME_PATTERN)); }
@Test public void convertsDateWithUtcWhenTimeZoneBlank() { assertEquals(formatDate("UTC"), convert(_timestamp, DATETIME_PATTERN, "")); }
@Test public void convertsDateWithUtcWhenTimeZoneUnknown() { assertEquals(formatDate("UTC"), convert(_timestamp, DATETIME_PATTERN, "FakeTimeZone")); }
@Test public void convertsDateInSpecifiedTimeZoneAsGmtOffset() { assertEquals(formatDate("GMT-8"), convert(_timestamp, DATETIME_PATTERN, "GMT-8")); }
@Test public void convertsDateInSpecifiedTimeZoneAsRawOffset() { assertEquals(formatDate("-0800"), convert(_timestamp, DATETIME_PATTERN, "-0800")); }
@Test public void convertsDateInSpecifiedTimeZoneAsTzid() { assertEquals(formatDate("CST"), convert(_timestamp, DATETIME_PATTERN, "CST")); }
@Test public void convertsDateAsIso8601WhenNull() { assertEquals(_isoDateString, convert(_timestamp, new String[]{null})); }
@Test public void convertsDateAsIso8601WhenSpecifiedByIsoName() { assertEquals(_isoDateString, convert(_timestamp, CoreConstants.ISO8601_STR)); }
@Test public void convertsDateAsIso8601WhenInvalidPatternSpecified() { assertEquals(_isoDateString, convert(_timestamp, "foo")); }
@Test public void convertsDateWithEnglishLocaleByDefault() { Locale origLocale = Locale.getDefault(); Locale.setDefault(Locale.FRANCE); assertEquals(ENGLISH_TIME_UTC, convert(_timestamp, DATETIME_PATTERN, "UTC")); Locale.setDefault(origLocale); }