ICalVCardHelper { public String createDate(Date d) { SimpleDateFormat dateFormatter = new SimpleDateFormat(YEAR_MONTH_DAY_FORMAT); dateFormatter.setTimeZone(TimeZone.getTimeZone("UTC")); return dateFormatter.format(d); }  T parse(Reader r, String characterSet, T entity); void write(AbstractEntity entity, Writer writer, String charset); byte[] toBytes(AbstractEntity entity, String charset); String createDate(Date d); String createDateTime(Date d); String formatDurationAsNegative(Duration d); String concatenateStrings(String delimiter, String... parts); String composeStructuredValueFromSingleValues(String... values); String composeStructuredValue(String... values); String concatenateListOfValues(String... values); String[] backslashEscape(char c, String... values); String[] backslashEscape(char[] chars, String... values); boolean isCharacterSetSupported(String charset);  }
@Test public void testCreateDate() { ICalVCardHelper helper = BEANS.get(ICalVCardHelper.class); Calendar cal = Calendar.getInstance(); cal.setTimeZone(TimeZone.getTimeZone("GMT")); cal.set(2019, 7, 23, 15, 22, 00); assertEquals("20190823", helper.createDate(cal.getTime())); }