@Test
public void testGetIso8601FromDate() {

    long epoch = 1591706189000L;
    Date now = new Date(epoch);
    Date anHourAgo = new Date(epoch - TimeUnit.HOURS.toMillis(1));
    Date yesterday = new Date(epoch - TimeUnit.DAYS.toMillis(1));
    Date lastMonth = new Date(epoch - TimeUnit.DAYS.toMillis(30));
    assertEquals("2020-06-09", DynamoDBUtils.getIso8601FromDate(now));
    assertEquals("2020-06-09", DynamoDBUtils.getIso8601FromDate(anHourAgo));
    assertEquals("2020-06-08", DynamoDBUtils.getIso8601FromDate(yesterday));
    assertEquals("2020-05-10", DynamoDBUtils.getIso8601FromDate(lastMonth));
}