DateTime startOne = new DateTime(2013, 1, 1, 0, 0, 0, 0);
DateTime endOne = new DateTime(2013, 1, 31, 0, 0, 0, 0);
DateTime startTwo = new DateTime(2013, 2, 1, 0, 0, 0, 0);
DateTime endTwo = new DateTime(2013, 2, 28, 0, 0, 0, 0);
Selector selectorOne = builder.forDateRange(startOne, endOne).build();
Selector selectorTwo = builder.forDateRange(startTwo, endTwo).build();
Assert.assertEquals(dateFormat.format(startOne.toDate()), selectorOne.getDateRange().getMin());
Assert.assertEquals(dateFormat.format(endOne.toDate()), selectorOne.getDateRange().getMax());
Assert.assertEquals(dateFormat.format(startTwo.toDate()), selectorTwo.getDateRange().getMin());
Assert.assertEquals(dateFormat.format(endTwo.toDate()), selectorTwo.getDateRange().getMax());
}