public void validate(
      final Logger logger, final CommandLine commandLine, final Predicate<String> configuredApis) {
    checkOptionDependencies(logger, commandLine);

    if (!rpcWsApis.stream().allMatch(configuredApis)) {
      final List<String> invalidWsApis = new ArrayList<>(rpcWsApis);
      invalidWsApis.removeAll(VALID_APIS);
      throw new CommandLine.ParameterException(
          commandLine,
          "Invalid value for option '--rpc-ws-api': invalid entries found " + invalidWsApis);
    }

    final boolean validWsApiMethods =
        rpcWsApiMethodsNoAuth.stream().allMatch(RpcMethod::rpcMethodExists);

    if (!validWsApiMethods) {
      throw new CommandLine.ParameterException(
          commandLine,
          "Invalid value for option '--rpc-ws-api-methods-no-auth', options must be valid RPC methods");
    }

    if (isRpcWsAuthenticationEnabled
        && rpcWsAuthenticationCredentialsFile(commandLine) == null
        && rpcWsAuthenticationPublicKeyFile == null) {
      throw new CommandLine.ParameterException(
          commandLine,
          "Unable to authenticate JSON-RPC WebSocket endpoint without a supplied credentials file or authentication public key file");
    }
  }
Validates the WebSocket options.

@param logger Logger instance
@param commandLine CommandLine instance
@param configuredApis Predicate for configured APIs
app/src/main/java/org/hyperledger/besu/cli/options/RpcWebsocketOptions.java