TriggerUtil { public static String triggerType(Trigger trigger) { return trigger.accept(TriggerTypeVisitor.INSTANCE); } private  TriggerUtil(); static boolean isBackfill(Trigger trigger); static String triggerType(Trigger trigger); static String triggerId(Trigger trigger); static List<String> triggerTypesList(); static Trigger trigger(String type, String triggerId); static final String NATURAL_TRIGGER_ID; }
@Test public void testTriggerType() { assertThat(triggerType(Trigger.natural()), is("natural")); assertThat(triggerType(Trigger.adhoc("foo")), is("adhoc")); assertThat(triggerType(Trigger.backfill("bar")), is("backfill")); assertThat(triggerType(Trigger.unknown("baz")), is("unknown")); }