private static String getAffectedOptions(
      final CommandLine commandLine, final List<String> dependentOptionsNames) {
    return commandLine.getCommandSpec().options().stream()
        .filter(option -> Arrays.stream(option.names()).anyMatch(dependentOptionsNames::contains))
        .filter(CommandLineUtils::isOptionSet)
        .map(option -> option.names()[0])
        .collect(
            Collectors.collectingAndThen(
                Collectors.toList(), StringUtils.joiningWithLastDelimiter(", ", " and ")));
  }
There are different ways to format an option value back to its CLI form, the first is to use a
{@link TypeFormatter} if present, otherwise the formatting it is delegated to {@link
OptionParser#format(Object)}

@param optConverter the list of converter types for the option
@param optVal the value of the options
@return a string with the CLI form of the value
app/src/main/java/org/hyperledger/besu/cli/util/CommandLineUtils.java