Repeatedly extends Trigger { @Override public String toString() { return String.format("Repeatedly.forever(%s)", subTriggers.get(REPEATED)); } private  Repeatedly(Trigger repeatedTrigger); static Repeatedly forever(Trigger repeated); Trigger getRepeatedTrigger(); @Override Instant getWatermarkThatGuaranteesFiring(BoundedWindow window); @Override boolean mayFinish(); @Override String toString();  }
@Test public void testToString() { Trigger trigger = Repeatedly.forever( new StubTrigger() { @Override public String toString() { return "innerTrigger"; } }); assertEquals("Repeatedly.forever(innerTrigger)", trigger.toString()); }