### Question:
TimeUtils { public static int findTimeIndex(List<DateTime> dtList, DateTime target) { return Collections.binarySearch(dtList, target, TIME_POSITION_COMPARATOR); } private  TimeUtils(); static String dateTimeToISO8601(DateTime dateTime); static DateTime iso8601ToDateTime(String isoDateTime, Chronology chronology); static int findTimeIndex(List<DateTime> dtList, DateTime target); static String formatUtcIsoTimeOnly(DateTime dateTime); static String formatUtcTimeOnly(DateTime dateTime); static String formatUtcHumanReadableDateTime(DateTime dateTime); static String formatUtcDateOnly(DateTime dateTime); static String getTimeStringForCapabilities(List<DateTime> times); static String getPeriodString(long period); static Extent<DateTime> getTimeRangeForString(String timeString, Chronology chronology); static boolean onSameDay(DateTime dt1, DateTime dt2); static int getUnitLengthSeconds(String unit); static final Comparator<DateTime> TIME_POSITION_COMPARATOR; }### Answer:
@Test public void testFindTimeIndex() { DateTime dt = new DateTime(1999, 12, 1, 0, 0, DateTimeZone.UTC); int index = TimeUtils.findTimeIndex(datetimes, dt); assertEquals(-1, index); dt = new DateTime(2000, 1, 4, 10, 0, DateTimeZone.UTC); index = TimeUtils.findTimeIndex(datetimes, dt); assertEquals(-5, index); dt = new DateTime(2000, 1, 19, 10, 0, DateTimeZone.UTC); index = TimeUtils.findTimeIndex(datetimes, dt); assertEquals(-11, index); dt = new DateTime(2000, 1, 4, 0, 0, DateTimeZone.UTC); index = TimeUtils.findTimeIndex(datetimes, dt); assertEquals(3, index); }