@Test
public void testLowerUpperBound() {
final List<Date> dates = new ArrayList<Date>();
dates.add(new Date(1,1,2009));
dates.add(new Date(2,1,2009));
dates.add(new Date(3,1,2009));
dates.add(new Date(3,1,2009));
dates.add(new Date(4,1,2009));
dates.add(new Date(5,1,2009));
dates.add(new Date(7,1,2009));
dates.add(new Date(7,1,2009));
dates.add(new Date(8,1,2009));
final Date lowerDate = new Date(3,1,2009);
final Date upperDate = new Date(7,1,2009);
final int expectedLowerBound = 2;
final int expectedUpperBound = 8;
final int lowerBound = Date.lowerBound(dates, lowerDate);
final int upperBound = Date.upperBound(dates, upperDate);