@Test
public void timeCheckerAndExpireTriggerTest() throws TriggerManagerException {

  final long curr = System.currentTimeMillis();
  final Trigger t1 = createPeriodAndEndCheckerTrigger(curr);
  this.triggerManager.insertTrigger(t1);
  t1.setResetOnTrigger(true);
  final BasicTimeChecker expireChecker =
      (BasicTimeChecker) t1.getExpireCondition().getCheckers().values()
          .toArray()[0];
  sleep(1000);
  assertTrue(expireChecker.eval() == false);
  assertTrue(t1.getStatus() == TriggerStatus.READY);
  sleep(1000);
  sleep(1000);
  sleep(1000);
  assertTrue(expireChecker.eval() == true);
  assertTrue(t1.getStatus() == TriggerStatus.PAUSED);
  sleep(1000);
  assertTrue(expireChecker.eval() == true);
  assertTrue(t1.getStatus() == TriggerStatus.PAUSED);
}