    @Test
    public void previous() throws ParseException {

        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(sdf.parse("20180101"));
        assertEquals("20171231", sdf.format(DateUtilExtensions.previous(calendar).getTime()));
    }