ErrorHandlerBuilder implements DataSetReadyCallback { @Override public void callback(final DataSet dataSet) { callback.accept(dataSet); }  @Inject void setErrorCallback(DefaultWorkbenchErrorCallback errorCallback); void setCallback(Consumer<DataSet> callback); void setUUID(String UUID); void setEmptyResultsCallback(Command emptyResultsCallback); ErrorHandlerBuilder withEmptyResultsCallback(final Command command); ErrorHandlerBuilder withUUID(final String UUID); ErrorHandlerBuilder withDataSetCallback(final Consumer<DataSet> dataSetCallback); @Override void notFound(); void showErrorMessage(final String message); @Override boolean onError(final ClientRuntimeError error); @Override void callback(final DataSet dataSet);  }
@Test public void testCallback() { final Consumer<DataSet> consumer = mock(Consumer.class); dataSetReadyCallback.setCallback(consumer); dataSetReadyCallback.callback(mock(DataSet.class)); verify(consumer).accept(any()); verify(errorCallback, never()).error(any()); verify(dataSetReadyCallback, never()).showErrorMessage(any()); }