private static void assertBackfillInfo(String appType, long expectedBackfillTs) {
    int loopCount = 800;
    BackfillInfo info = BackfillInfo.find.byId(appType);
    while ((info == null || info.backfillTs != expectedBackfillTs) && loopCount > 0) {
      try {
        Thread.sleep(50);
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
      info = BackfillInfo.find.byId(appType);
      loopCount--;
    }
    assertEquals(expectedBackfillTs, info.backfillTs);
  }
Tests backfilling of jobs when Dr.Elephant comes up.
test/com/linkedin/drelephant/BackfillTest.java