### Question:
ImportDataObjectModal extends Elemental2Modal<ImportDataObjectModal.View> { Consumer<List<DataObject>> getConsumer() { return objects -> { getView().clear(); getView().addItems(objects); superShow(); }; } @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 testGetConsumer() { doNothing().when(modal).superShow(); final Consumer<List<DataObject>> consumer = modal.getConsumer(); final List<DataObject> items = mock(List.class); when(items.isEmpty()).thenReturn(false); consumer.accept(items); verify(view).clear(); verify(view).addItems(items); verify(modal).superShow(); }