ConvertCommand extends AbstractCommand implements Performable { @Override public boolean run() { final List<SpecificationItem> items = importItems(); convert(items); return true; } ConvertCommand(final CliArguments arguments); @Override boolean run(); static final String COMMAND_NAME; }
@Test void testRun() { final CliArguments args = new CliArguments(directoryServiceMock); args.setUnnamedValues(asList("convert", "input")); final ExporterException exception = assertThrows(ExporterException.class, () -> new ConvertCommand(args).run()); assertThat(exception.getMessage(), equalTo("Found no matching exporter for output format 'specobject'")); }