protected boolean isSecure(String key, ClusterProfile clusterProfile) {
        ElasticAgentPluginInfo pluginInfo = this.metadataStore().getPluginInfo(clusterProfile.getPluginId());

        if (pluginInfo == null
                || pluginInfo.getElasticAgentProfileSettings() == null
                || pluginInfo.getElasticAgentProfileSettings().getConfiguration(key) == null) {
            return false;
        }

        return pluginInfo.getElasticAgentProfileSettings().getConfiguration(key).isSecure();
    }
@Test
    public void postConstruct_shouldIgnoreEncryptionIfPluginInfoIsNotDefined() {
        ElasticProfile profile = new ElasticProfile("id", "prod-cluster", new ConfigurationProperty(new ConfigurationKey("password"), new ConfigurationValue("pass")));

//        profile.encryptSecureConfigurations();

        assertThat(profile.size(), is(1));
        assertFalse(profile.first().isSecure());
    }