@Override
    public Result run(GoPluginDescriptor pluginDescriptor, Map<String, List<String>> extensionsInfoOfPlugin) {
        final ValidationResult validationResult = validate(pluginDescriptor, extensionsInfoOfPlugin);
        return new Result(validationResult.hasError(), validationResult.toErrorMessage());
    }
@Test
    void shouldAddErrorAndReturnValidationResultWhenPluginRequiredExtensionIsNotSupportedByGoCD() {
        final PluginPostLoadHook.Result validationResult = pluginExtensionsAndVersionValidator.run(descriptor, Map.of("some-invalid-extension", List.of("2.0")));

        assertThat(validationResult.isAFailure()).isTrue();
        assertThat(validationResult.getMessage()).isEqualTo("Extension incompatibility detected between plugin(Some-Plugin-Id) and GoCD:\n" +
                "  Extension(s) [some-invalid-extension] used by the plugin is not supported. GoCD Supported extensions are [authorization, elastic-agent].");
    }