public static String formatDate(Date date, String format) {
        if (date == null) {
            return null;
        }
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        return sdf.format(date);
    }
@Test
    public void testFormatDate() {
        Date currentDate = DateUtil.getCurrentDate();
        String dateStr = DateUtil.formatDate(currentDate, "yyyy-MM-dd HH:mm:ss");
        Assertions.assertNotNull(dateStr);
    }