public static void ensureExactOrExit(List<OptionSpec<?>> exactExpectedOptions, List<OptionSpec<?>> actualOptions,
      OptionParser parser) throws IOException {
    if (!new HashSet<>(exactExpectedOptions).equals(new HashSet<>(actualOptions))) {
      System.err.println("***Incompatible options, expected exactly: " + exactExpectedOptions);
      parser.printHelpOn(System.err);
      System.exit(1);
    }
  }
Ensures that the given argument list has only and exactly the options in the given list and nothing else.
@param exactExpectedOptions the exact options expected
@param actualOptions the actual options received.
@param parser the {@link OptionParser} used to parse arguments.
@throws IOException if there is a problem writing out usage information.
ambry-tools/src/main/java/com/github/ambry/tools/util/ToolUtils.java