@Test
public void testGetDateDifferenceInMinutes() throws Exception {

  Calendar calendar = Calendar.getInstance();
  calendar.setTimeZone(TimeZone.getTimeZone("UTC"));
  calendar.set(Calendar.YEAR, 2013);
  calendar.set(Calendar.MONTH, Calendar.NOVEMBER);
  calendar.set(Calendar.DAY_OF_MONTH, 18);
  calendar.set(Calendar.HOUR_OF_DAY, 14);
  calendar.set(Calendar.MINUTE, 49);
  calendar.set(Calendar.SECOND, 29);
  calendar.set(Calendar.MILLISECOND, 0);
  String time = "2013-11-18T14:29:29-0000";
  Date date = DateUtils.convertToDate(time);
  Long diff = (Math.abs(date.getTime() - calendar.getTimeInMillis())) / (60 * 1000) % 60;
  Assert.assertEquals(Long.valueOf(20L).longValue(), diff.longValue());
}