### Question:
DateUtils { public static String getCurrentDate() { return dataFormat.get().format(new Date()); }  static String getCurrentDate(); static String formatDate(Date date);  }### Answer:
@Test public void testGetCurrentDateWithCorrectFormat() { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Assert.assertEquals(DateUtils.getCurrentDate(),dateFormat.format(new Date()).toString()); }
@Test public void testGetCurrentDateWithInCorrectFormat() { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); Assert.assertNotEquals(DateUtils.getCurrentDate(),dateFormat.format(new Date()).toString()); }