LabelledEvents { public static <T> void finish(T query, String correlationId, EventBus bus, String... labels) { for (String type : labels) { RemoveLabelledQuery<T> next = finish(query, correlationId, type); bus.post(next); } }  static void start(T query, String correlationId, EventBus bus, String... labels); static AddLabelledQuery<T> start(T query, String correlationId, String label); static AddLabelledQuery<T> start(T query, String correlationId, String label, Object additionalData); static void finish(T query, String correlationId, EventBus bus, String... labels); static RemoveLabelledQuery<T> finish(T query, String correlationId, String label);  }
@Test public void createRemoveLabelledQuery() { RemoveLabelledQuery<String> userQuery = LabelledEvents.finish(query, corrId, label); RequestData<String> rd = userQuery.getData(); assertThat(rd.getQuery(), is(query)); assertThat(rd.getType(), is(label)); assertThat(rd.getCorrelationId(), is(corrId)); }