public class TestLateRerunHandler {
@Test
public void testFeedCutOff() throws FalconException {
Feed feed = new Feed();
LateArrival lateArrival = new LateArrival();
lateArrival.setCutOff(Frequency.fromString("days(1)"));
feed.setLateArrival(lateArrival);
String nm = "2013-10-01T12:00Z";
Date cutOff = LateRerunHandler.getCutOffTime(feed, nm);
Assert.assertEquals(EntityUtil.parseDateUTC("2013-10-02T12:00Z"), cutOff);
lateArrival.setCutOff(Frequency.fromString("days(10000000)"));
cutOff = LateRerunHandler.getCutOffTime(feed, nm);
Assert.assertTrue(cutOff.after(new Date()));
}