GafferSink extends RichSinkFunction<Element> { @Override public void invoke(final Element element) throws Exception { adder.add(element); } <OP extends Validatable & Operation> GafferSink(final OP validatable, final Store store);  GafferSink(final GafferAdder adder); @Override void open(final Configuration parameters); @Override void invoke(final Element element);  }
@Test public void shouldDelegateInvokeToGafferAddedInitialise() throws Exception { final GafferAdder adder = mock(GafferAdder.class); final GafferSink sink = new GafferSink(adder); final Element element = mock(Element.class); sink.invoke(element); verify(adder).add(element); }