### Question:
DelayConstraint extends ProtoConstraint.DelayConstraint implements CheckableConstraint { public DelayConstraint(long delayAfterTrigger, TimeUnit unit) { super(delayAfterTrigger, unit); } DelayConstraint(long delayAfterTrigger, TimeUnit unit); @Override ConstraintResult check(ProgramSchedule schedule, ConstraintContext context);  }### Answer:
@Test public void testDelayConstraint() { long now = System.currentTimeMillis(); ProgramSchedule schedule = new ProgramSchedule("SCHED1", "one partition schedule", WORKFLOW_ID, ImmutableMap.of("prop3", "abc"), new PartitionTrigger(DATASET_ID, 1), ImmutableList.<Constraint>of()); SimpleJob job = new SimpleJob(schedule, 0, now, Collections.<Notification>emptyList(), Job.State.PENDING_TRIGGER, 0L); DelayConstraint tenMinuteDelayConstraint = new DelayConstraint(10, TimeUnit.MINUTES); ConstraintContext constraintContext = new ConstraintContext(job, now + TimeUnit.MINUTES.toMillis(12), null); ConstraintResult result = tenMinuteDelayConstraint.check(schedule, constraintContext); Assert.assertEquals(ConstraintResult.SATISFIED, result); constraintContext = new ConstraintContext(job, now + TimeUnit.MINUTES.toMillis(9), null); result = tenMinuteDelayConstraint.check(schedule, constraintContext); Assert.assertEquals(ConstraintResult.SatisfiedState.NOT_SATISFIED, result.getSatisfiedState()); Assert.assertEquals(constraintContext.getCheckTimeMillis() + TimeUnit.MINUTES.toMillis(1), (long) result.getNextCheckTime()); }