EventStorage { public boolean hasEvents(final EventType type) { return !getAll().filter(byType(type)).isEmpty(); }  static EventStorage storage(); static EventStorage newInstance(); void store(final Event event); boolean has(Event event); void clean(); FluentIterable<? extends Event> getChildren(Event event, final EventType type); Event getParent(Event event); Event getParent(Event event, EventType type); FluentIterable<? extends Event> getAllChildren(Event event, final EventType type); FluentIterable<? extends Event> getTree(Event event); Event getRootParent(Event event); void remove(Event event); void clearTree(Event event); FluentIterable<? extends Event> getChildren(final Event event); FluentIterable<? extends Event> getAllChildren(Event event); FluentIterable<? extends Event> getAll(); boolean storeIf(Event event, boolean expression); boolean storeIfParentStored(Event event); boolean hasEvents(final EventType type); boolean hasParent(Event event);  }
@Test public void should_checkForEventExistense() { assertThat("Has unexpected commit", !st.hasEvents(EventType.COMMIT)); assertThat("Doesnt have test case finish", st.hasEvents(EventType.TEST_CASE_FINISH)); }