public Map<String, Map<String, Object>> getPropertyMetadataAndValuesAsMap() {
        Map<String, Map<String, Object>> configMap = new HashMap<>();
        for (ConfigurationProperty property : this) {
            Map<String, Object> mapValue = new HashMap<>();
            mapValue.put("isSecure", property.isSecure());
            if (property.isSecure()) {
                mapValue.put(VALUE_KEY, property.getEncryptedValue());
            } else {
                final String value = property.getConfigurationValue() == null ? null : property.getConfigurationValue().getValue();
                mapValue.put(VALUE_KEY, value);
            }
            mapValue.put("displayValue", property.getDisplayValue());
            configMap.put(property.getConfigKeyName(), mapValue);
        }
        return configMap;
    }
@Test
    void shouldReturnConfigWithMetadataAsMap() throws CryptoException {
        ConfigurationProperty configurationProperty1 = ConfigurationPropertyMother.create("property1", false, "value");
        ConfigurationProperty configurationProperty2 = ConfigurationPropertyMother.create("property2", false, null);
        String password = new GoCipher().encrypt("password");
        ConfigurationProperty configurationProperty3 = ConfigurationPropertyMother.create("property3");
        configurationProperty3.setEncryptedValue(new EncryptedConfigurationValue(password));
        Configuration configuration = new Configuration(configurationProperty1, configurationProperty2, configurationProperty3);
        Map<String, Map<String, Object>> metadataAndValuesAsMap = configuration.getPropertyMetadataAndValuesAsMap();
        Map<Object, Object> expectedMap = new HashMap<>();
        expectedMap.put("property1", buildPropertyMap(false, "value", "value"));
        expectedMap.put("property2", buildPropertyMap(false, null, null));
        expectedMap.put("property3", buildPropertyMap(true, password, "****"));

        assertThat(metadataAndValuesAsMap).isEqualTo(expectedMap);
    }