StateEvaluationContext extends EvaluationContext<T> { public Map<String, T> getEvents() { return events; } StateEvaluationContext(MRecord values, String alias); Map<String, T> getEvents(); @Override MRecord get(); void set(MRecord values); void setAlias(String alias); void collect(String key, T event); @Override @Deprecated @SuppressWarnings("squid:S1133") // no reminder to remove the deprecated method needed void collect(T event);  }
@Test public void getEvents() { stateEvaluationContext.collect("test", event); Map<String, GenericEvent> events = stateEvaluationContext.getEvents(); Assert.assertNotNull(events); Assert.assertNotEquals(0, events.size()); Assert.assertEquals(event, events.get("test")); }