### Question:
ImportDataObjectModal extends Elemental2Modal<ImportDataObjectModal.View> { ServiceCallback<List<DataObject>> wrap(final Consumer<List<DataObject>> consumer) { return new ServiceCallback<List<DataObject>>() { @Override public void onSuccess(final List<DataObject> items) { consumer.accept(items); } @Override public void onError(final ClientRuntimeError error) { } }; } @Inject  ImportDataObjectModal(final View view,
                                 final DMNClientServicesProxy client); Consumer<List<DataObject>> getDataObjectsConsumer(); void setup(final Consumer<List<DataObject>> dataObjectsConsumer); void hide(final List<DataObject> importedDataObjects); void show(final List<String> existingDataTypes); List<String> getExistingDataTypes();  }### Answer:
@Test public void testWrap() { final Consumer consumer = mock(Consumer.class); final ServiceCallback service = modal.wrap(consumer); final List<DataObject> items = mock(List.class); service.onSuccess(items); verify(consumer).accept(items); }