@Test public void testCollect() { EventSink<GenericEvent> mock = Mockito.mock(EventSink.class); EventSinkContext<GenericEvent> context = new EventSinkContext<>(mock); UntypedValues current = new UntypedValues(); context.setCurrent(current); MRecord record = context.get(); assertEquals(current, record); GenericEvent event = new GenericEvent(); context.collect(event); Mockito.verify(mock).handle(ArgumentMatchers.eq(event)); }
@Override public void collect(T event) { sink.handle(event); }
EventSinkContext extends EvaluationContext<T> { @Override public void collect(T event) { sink.handle(event); } }
EventSinkContext extends EvaluationContext<T> { @Override public void collect(T event) { sink.handle(event); } EventSinkContext(EventSink<T> sink); }
EventSinkContext extends EvaluationContext<T> { @Override public void collect(T event) { sink.handle(event); } EventSinkContext(EventSink<T> sink); void setCurrent(MRecord current); @Override MRecord get(); @Override void collect(T event); }
EventSinkContext extends EvaluationContext<T> { @Override public void collect(T event) { sink.handle(event); } EventSinkContext(EventSink<T> sink); void setCurrent(MRecord current); @Override MRecord get(); @Override void collect(T event);  }