@Override
  protected Trigger getContinuationTrigger(List<Trigger> continuationTriggers) {
    // Use OrFinallyTrigger instead of AfterFirst because the continuation of ACTUAL
    // may not be a OnceTrigger.
    return Repeatedly.forever(
        new OrFinallyTrigger(
            continuationTriggers.get(ACTUAL),
            (Trigger.OnceTrigger) continuationTriggers.get(UNTIL)));
  }
@Test
  public void testContinuation() throws Exception {
    OnceTrigger triggerA = AfterProcessingTime.pastFirstElementInPane();
    OnceTrigger triggerB = AfterWatermark.pastEndOfWindow();
    Trigger aOrFinallyB = triggerA.orFinally(triggerB);
    Trigger bOrFinallyA = triggerB.orFinally(triggerA);
    assertEquals(
        Repeatedly.forever(
            triggerA.getContinuationTrigger().orFinally(triggerB.getContinuationTrigger())),
        aOrFinallyB.getContinuationTrigger());
    assertEquals(
        Repeatedly.forever(
            triggerB.getContinuationTrigger().orFinally(triggerA.getContinuationTrigger())),
        bOrFinallyA.getContinuationTrigger());
  }