public static FromEndOfWindow pastEndOfWindow() {
    return new FromEndOfWindow();
  }
@Test
  public void testEarlyAndLateOnMergeSubtriggerMerges() throws Exception {
    tester =
        TriggerStateMachineTester.forTrigger(
            AfterWatermarkStateMachine.pastEndOfWindow()
                .withEarlyFirings(mockEarly)
                .withLateFirings(mockLate),
            Sessions.withGapDuration(Duration.millis(10)));

    tester.injectElements(1);
    tester.injectElements(5);

    tester.mergeWindows();
    // Merging should re-activate the early trigger in the merged window
    verify(mockEarly).onMerge(Mockito.any(OnMergeContext.class));
    // Merging should merge the late trigger in the merged window so it can be cleared.
    verify(mockLate).onMerge(Mockito.any(OnMergeContext.class));
  }