protected VersionedElasticAgentExtension getVersionedElasticAgentExtension(String pluginId) {
        final String resolvedExtensionVersion = pluginManager.resolveExtensionVersion(pluginId, ELASTIC_AGENT_EXTENSION, goSupportedVersions());
        return elasticAgentExtensionMap.get(resolvedExtensionVersion);
    }
@Test
    public void shouldHaveVersionedElasticAgentExtensionForAllSupportedVersions() {
        for (String supportedVersion : SUPPORTED_VERSIONS) {
            final String message = String.format("Must define versioned extension class for %s extension with version %s", ELASTIC_AGENT_EXTENSION, supportedVersion);

            when(pluginManager.resolveExtensionVersion(PLUGIN_ID, ELASTIC_AGENT_EXTENSION, SUPPORTED_VERSIONS)).thenReturn(supportedVersion);

            final VersionedElasticAgentExtension extension = this.extension.getVersionedElasticAgentExtension(PLUGIN_ID);

            assertNotNull(extension, message);

            assertThat(ReflectionUtil.getField(extension, "VERSION"), is(supportedVersion));
        }
    }