AfterAllStateMachine extends TriggerStateMachine { @Override public String toString() { StringBuilder builder = new StringBuilder("AfterAll.of("); Joiner.on(", ").appendTo(builder, subTriggers); builder.append(")"); return builder.toString(); } private  AfterAllStateMachine(List<TriggerStateMachine> subTriggers); @SafeVarargs static TriggerStateMachine of(TriggerStateMachine... triggers); static TriggerStateMachine of(Iterable<? extends TriggerStateMachine> triggers); @Override void onElement(OnElementContext c); @Override void onMerge(OnMergeContext c); @Override boolean shouldFire(TriggerContext context); @Override void onFire(TriggerContext context); @Override String toString();  }
@Test public void testToString() { TriggerStateMachine trigger = AfterAllStateMachine.of( StubTriggerStateMachine.named("t1"), StubTriggerStateMachine.named("t2")); assertEquals("AfterAll.of(t1, t2)", trigger.toString()); }