@PUT
    @Path("/{pluginName}/config/validate")
    @Operation(summary = "Validate the provided configuration against the configuration definition for the specified pluginName")
    public ConfigInfos validateConfigs(
        final @PathParam("pluginName") String pluginName,
        final Map<String, String> connectorConfig
    ) throws Throwable {
        String includedConnType = connectorConfig.get(ConnectorConfig.CONNECTOR_CLASS_CONFIG);
        if (includedConnType != null
            && !normalizedPluginName(includedConnType).endsWith(normalizedPluginName(pluginName))) {
            throw new BadRequestException(
                "Included connector type " + includedConnType + " does not match request type "
                    + pluginName
            );
        }

        // the validated configs don't need to be logged
        FutureCallback<ConfigInfos> validationCallback = new FutureCallback<>();
        herder.validateConnectorConfig(connectorConfig, validationCallback, false);

        try {
            return validationCallback.get(requestTimeout.timeoutMs(), TimeUnit.MILLISECONDS);
        } catch (StagedTimeoutException e) {
            Stage stage = e.stage();
            String message;
            if (stage.completed() != null) {
                message = "Request timed out. The last operation the worker completed was "
                        + stage.description() + ", which began at "
                        + Instant.ofEpochMilli(stage.started()) + " and completed at "
                        + Instant.ofEpochMilli(stage.completed());
            } else {
                message = "Request timed out. The worker is currently "
                        + stage.description() + ", which began at "
                        + Instant.ofEpochMilli(stage.started());
            }
            // This timeout is for the operation itself. None of the timeout error codes are relevant, so internal server
            // error is the best option
            throw new ConnectRestException(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), message);
        } catch (TimeoutException e) {
            // This timeout is for the operation itself. None of the timeout error codes are relevant, so internal server
            // error is the best option
            throw new ConnectRestException(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Request timed out");
        } catch (InterruptedException e) {
            throw new ConnectRestException(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Request interrupted");
        }
    }
@Test
    public void testValidateConfigWithNonExistentAlias() {
        assertThrows(BadRequestException.class, () -> connectorPluginsResource.validateConfigs("ConnectorPluginsTest", PROPS));
    }