class LegacyCliAdapter implements CliAdapter, Callable<CliResult> {

    @Override
    public CliResult execute(String... args) throws Exception {

        final ConfigBuilder configBuilder =
                Optional.ofNullable(tomlfile)
                        .map(fileDelegate::newInputStream)
                        .map(stream -> this.configFactory.create(stream, null))
                        .orElse(ConfigBuilder.create());

        final KeyDataBuilder keyDataBuilder =
                Optional.ofNullable(tomlfile)
                        .map(fileDelegate::newInputStream)
                        .map(configFactory::createKeyDataBuilder)
                        .orElse(KeyDataBuilder.create());

        ConfigBuilder adjustedConfig = applyOverrides(configBuilder, keyDataBuilder);

        Config config = adjustedConfig.build();

        return writeToOutputFile(config, outputPath);
    }

    public  LegacyCliAdapter();

}