### Question:
DateUtil { public Date addTimeOffset(Date date, int mins) { if (date == null) { return date; } long t = date.getTime(); Date newDate = new Date(t + (mins * 60000)); return newDate; }  Date getDateFromNow(int days); Date getDateFromNow(int days, int hours, int minutes); static String dateToString(Date date, String dateFromat); Date getDateFromGivenDate(Date date, int days, int hours,int minutes, int second); Date addTimeOffset(Date date, int mins); static Date getUTCDate(); static Date getUTCDate(long epoh); static Date stringToDate(String dateString, String dateFromat);  }### Answer:
@Test public void testAddTimeOffset(){ Date date = new Date(); int mins=date.getMinutes(); Date currentDate=dateUtil.addTimeOffset(date, 0); Assert.assertEquals(currentDate.getDate(),date.getDate()); Assert.assertEquals(currentDate.getMinutes(),mins); }