public Map<String, Map<String, String>> configAsMap() {
        Map<String, Map<String, String>> configMap = new HashMap<>();
        for (ConfigurationProperty property : configuration) {
            Map<String, String> mapValue = new HashMap<>();
            mapValue.put(VALUE_KEY, property.getValue());
            if (!property.errors().isEmpty()) {
                mapValue.put(ERRORS_KEY, StringUtils.join(property.errors().getAll(), ", "));
            }
            configMap.put(property.getConfigKeyName(), mapValue);
        }
        return configMap;
    }
@Test
    public void testConfigAsMap() throws Exception {
        PluginConfiguration pluginConfiguration = new PluginConfiguration("test-plugin-id", "13.4");

        GoCipher cipher = new GoCipher();
        List<String> keys = List.of("Avengers 1", "Avengers 2", "Avengers 3", "Avengers 4");
        List<String> values = List.of("Iron man", "Hulk", "Thor", "Captain America");

        Configuration configuration = new Configuration(
                new ConfigurationProperty(new ConfigurationKey(keys.get(0)), new ConfigurationValue(values.get(0))),
                new ConfigurationProperty(new ConfigurationKey(keys.get(1)), new ConfigurationValue(values.get(1))),
                new ConfigurationProperty(new ConfigurationKey(keys.get(2)), new ConfigurationValue(values.get(2))),
                new ConfigurationProperty(new ConfigurationKey(keys.get(3)), null, new EncryptedConfigurationValue(cipher.encrypt(values.get(3))), cipher)
        );

        PluggableTask task = new PluggableTask(pluginConfiguration, configuration);

        Map<String, Map<String, String>> configMap = task.configAsMap();
        assertThat(configMap.keySet().size(), is(keys.size()));
        assertThat(configMap.values().size(), is(values.size()));
        assertThat(configMap.keySet().containsAll(keys), is(true));
        for (int i = 0; i < keys.size(); i++) {
            assertThat(configMap.get(keys.get(i)).get(PluggableTask.VALUE_KEY), is(values.get(i)));
        }
    }