@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 shouldAddErrorAndReturnValidationResultWhenPluginRequiredExtensionVersionIsNotSupportedByGoCD() {
        final PluginPostLoadHook.Result validationResult = pluginExtensionsAndVersionValidator.run(descriptor, Map.of(ELASTIC_AGENT_EXTENSION, List.of("3.0")));

        assertThat(validationResult.isAFailure()).isTrue();
        assertThat(validationResult.getMessage())
                .isEqualTo("Extension incompatibility detected between plugin(Some-Plugin-Id) and GoCD:\n" +
                        "  Expected elastic-agent extension version(s) [3.0] by plugin is unsupported. GoCD Supported versions are [1.0, 2.0].");
    }