OftRunner implements Oft { @Override public List<SpecificationItem> importItems(final ImportSettings settings) { return serviceFactory.createImporterService(settings) .createImporter() .importAny(settings.getInputs()) .getImportedItems(); } OftRunner();   OftRunner(ServiceFactory serviceFactory); @Override List<SpecificationItem> importItems(final ImportSettings settings); @Override List<SpecificationItem> importItems(); @Override List<LinkedSpecificationItem> link(final List<SpecificationItem> items); @Override Trace trace(final List<LinkedSpecificationItem> linkedItems); @Override void exportToPath(final List<SpecificationItem> items, final Path path); @Override void exportToPath(final List<SpecificationItem> items, final Path path,
            final ExportSettings settings); @Override void reportToStdOut(final Trace trace); @Override void reportToStdOut(final Trace trace, final ReportSettings settings); @Override void reportToPath(final Trace trace, final Path outputPath); @Override void reportToPath(final Trace trace, final Path outputPath,
            final ReportSettings settings);  }
@Test void testImportItemsWithDefaultImportSettings() { assertThat(oftRunner.importItems(), sameInstance(importedItems)); final ArgumentCaptor<ImportSettings> arg = ArgumentCaptor.forClass(ImportSettings.class); verify(serviceFactoryMock).createImporterService(arg.capture()); assertDefaultSettings(arg.getValue()); }
@Test void testImportItemsWithCustomImportSettings() { final ImportSettings importSettings = ImportSettings.createDefault(); assertThat(oftRunner.importItems(importSettings), sameInstance(importedItems)); verify(serviceFactoryMock).createImporterService(same(importSettings)); }