@Override
    public ValidationResult validateSecretsConfig(String pluginId, final Map<String, String> configuration) {
        return pluginRequestHelper.submitRequest(pluginId, REQUEST_VALIDATE_SECRETS_CONFIG,
            new DefaultPluginInteractionCallback<>() {
                @Override
                public String requestBody(String resolvedExtensionVersion) {
                    return secretsMessageConverterV1.validatePluginConfigurationRequestBody(configuration);
                }

                @Override
                public ValidationResult onSuccess(String responseBody, Map<String, String> responseHeaders,
                                                  String resolvedExtensionVersion) {
                    return secretsMessageConverterV1.getSecretsConfigValidationResultFromResponse(responseBody);
                }
            });
    }
@Test
    void shouldTalkToPlugin_toValidateSecretsConfig() {
        String responseBody = "[{\"message\":\"Vault Url cannot be blank.\",\"key\":\"Url\"},{\"message\":\"Path cannot be blank.\",\"key\":\"Path\"}]";
        when(pluginManager.submitTo(eq(PLUGIN_ID), eq(SECRETS_EXTENSION), requestArgumentCaptor.capture())).thenReturn(DefaultGoPluginApiResponse.success(responseBody));

        final ValidationResult result = secretsExtensionV1.validateSecretsConfig(PLUGIN_ID, Map.of("username", "some_name"));

        assertThat(result.isSuccessful()).isFalse();
        assertThat(result.getErrors()).contains(new ValidationError("Url", "Vault Url cannot be blank."), new ValidationError("Path", "Path cannot be blank."));

        assertExtensionRequest(REQUEST_VALIDATE_SECRETS_CONFIG, "{\"username\":\"some_name\"}");
    }