@Test
public void testDateToSecondsSinceEpoch() {

    final GregorianCalendar calendar = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
    calendar.set(Calendar.YEAR, 2010);
    calendar.set(Calendar.DAY_OF_YEAR, 334);
    calendar.set(Calendar.HOUR_OF_DAY, 0);
    calendar.set(Calendar.MINUTE, 0);
    calendar.set(Calendar.SECOND, 0);
    calendar.set(Calendar.MILLISECOND, 83019029);
    assertEquals(1038697419.029, TimeUtil.dateToSecondsSinceEpoch(calendar.getTime()), 1e-8);
}