@Test
public void testCollect() {

    EventSink<GenericEvent> mock = Mockito.mock(EventSink.class);
    EventSinkContext<GenericEvent> context = new EventSinkContext<>(mock);
    // Check getter and setter
    UntypedValues current = new UntypedValues();
    context.setCurrent(current);
    MRecord record = context.get();
    assertEquals(current, record);
    // Call collect
    GenericEvent event = new GenericEvent();
    context.collect(event);
    // Assert that it is called.
    Mockito.verify(mock).handle(ArgumentMatchers.eq(event));
}