ReshuffleTriggerStateMachine extends TriggerStateMachine { @Override public boolean shouldFire(TriggerStateMachine.TriggerContext context) throws Exception { return true; } private  ReshuffleTriggerStateMachine(); static ReshuffleTriggerStateMachine create(); @Override void onElement(TriggerStateMachine.OnElementContext c); @Override void onMerge(TriggerStateMachine.OnMergeContext c); @Override boolean shouldFire(TriggerStateMachine.TriggerContext context); @Override void onFire(TriggerStateMachine.TriggerContext context); @Override String toString();  }
@Test public void testShouldFire() throws Exception { TriggerStateMachineTester<Integer, IntervalWindow> tester = TriggerStateMachineTester.forTrigger( ReshuffleTriggerStateMachine.create(), FixedWindows.of(Duration.millis(100))); IntervalWindow arbitraryWindow = new IntervalWindow(new Instant(300), new Instant(400)); assertTrue(tester.shouldFire(arbitraryWindow)); }