@Test
void testParse() {

    long date;
    final FormatDate formatDate = new FormatDate(null);
    date = formatDate.parseDate(null, "2001/01/01", "yyyy/MM/dd", null);
    assertThat(DateUtil.createNormalDateTimeString(date)).isEqualTo("2001-01-01T00:00:00.000Z");
    date = formatDate.parseDate(null, "2001/08/01", "yyyy/MM/dd", "GMT");
    assertThat(DateUtil.createNormalDateTimeString(date)).isEqualTo("2001-08-01T00:00:00.000Z");
    date = formatDate.parseDate(null, "2001/08/01 00:00:00.000", "yyyy/MM/dd HH:mm:ss.SSS", "GMT");
    assertThat(DateUtil.createNormalDateTimeString(date)).isEqualTo("2001-08-01T00:00:00.000Z");
    date = formatDate.parseDate(null, "2001/08/01 00:00:00", "yyyy/MM/dd HH:mm:ss", "Europe/London");
    assertThat(DateUtil.createNormalDateTimeString(date)).isEqualTo("2001-07-31T23:00:00.000Z");
    date = formatDate.parseDate(null, "2001/01/01", "yyyy/MM/dd", "GMT");
    assertThat(DateUtil.createNormalDateTimeString(date)).isEqualTo("2001-01-01T00:00:00.000Z");
    date = formatDate.parseDate(null, "2008/08/08:00:00:00", "yyyy/MM/dd:HH:mm:ss", "Europe/London");
    assertThat(DateUtil.createNormalDateTimeString(date)).isEqualTo("2008-08-07T23:00:00.000Z");
    date = formatDate.parseDate(null, "2008/08/08", "yyyy/MM/dd", "Europe/London");
    assertThat(DateUtil.createNormalDateTimeString(date)).isEqualTo("2008-08-07T23:00:00.000Z");
}