public static String format(Date date) {
    return format(date, false, TIMEZONE_UTC);
  }
@Test
  public void testDateFormatString() {
    GregorianCalendar calendar = new GregorianCalendar(utcTimeZone(), Locale.US);
    // Calendar was created with current time, must clear it
    calendar.clear();
    calendar.set(2018, Calendar.JUNE, 25);
    Date date = calendar.getTime();
    String dateStr = ISO8601Utils.format(date);
    String expectedDate = "2018-06-25T00:00:00Z";
    assertThat(dateStr).isEqualTo(expectedDate);
  }