OrFinallyTrigger extends Trigger { @Override public String toString() { return String.format("%s.orFinally(%s)", subTriggers.get(ACTUAL), subTriggers.get(UNTIL)); } @VisibleForTesting  OrFinallyTrigger(Trigger actual, Trigger.OnceTrigger until); Trigger getMainTrigger(); OnceTrigger getUntilTrigger(); @Override Instant getWatermarkThatGuaranteesFiring(BoundedWindow window); @Override boolean mayFinish(); @Override String toString();  }
@Test public void testToString() { Trigger trigger = StubTrigger.named("t1").orFinally(StubTrigger.named("t2")); assertEquals("t1.orFinally(t2)", trigger.toString()); }