AfterFirst extends OnceTrigger { @Override public String toString() { StringBuilder builder = new StringBuilder("AfterFirst.of("); Joiner.on(", ").appendTo(builder, subTriggers); builder.append(")"); return builder.toString(); } AfterFirst(List<Trigger> subTriggers); static AfterFirst of(OnceTrigger... triggers); static AfterFirst of(List<Trigger> triggers); @Override Instant getWatermarkThatGuaranteesFiring(BoundedWindow window); @Override String toString();  }
@Test public void testToString() { Trigger trigger = AfterFirst.of(StubTrigger.named("t1"), StubTrigger.named("t2")); assertEquals("AfterFirst.of(t1, t2)", trigger.toString()); }