public void addConfigurations(List<ConfigurationProperty> configurations) {
        ConfigurationPropertyBuilder builder = new ConfigurationPropertyBuilder();
        for (ConfigurationProperty property : configurations) {

            if(isValidPluginConfiguration(property.getConfigKeyName())) {
                configuration.add(builder.create(property.getConfigKeyName(), property.getConfigValue(), property.getEncryptedValue(),
                                                 pluginConfigurationFor(property.getConfigKeyName()).getOption(Property.SECURE)));
            } else {
                configuration.add(property);
            }
        }
    }
@Test
    public void shouldAddConfigurationProperties() {
        List<ConfigurationProperty> configurationProperties = List.of(ConfigurationPropertyMother.create("key", "value", "encValue"), new ConfigurationProperty());
        PluginConfiguration pluginConfiguration = new PluginConfiguration("github.pr", "1.1");
        TaskPreference taskPreference = mock(TaskPreference.class);
        TaskConfig taskConfig = new TaskConfig();
        Configuration configuration = new Configuration();
        Property property = new Property("key");
        property.with(Property.SECURE, false);

        PluggableTaskConfigStore.store().setPreferenceFor(pluginConfiguration.getId(), taskPreference);
        taskConfig.addProperty("key");

        when(taskPreference.getConfig()).thenReturn(taskConfig);

        PluggableTask pluggableTask = new PluggableTask(pluginConfiguration, configuration);
        pluggableTask.addConfigurations(configurationProperties);

        assertThat(configuration.size(), is(2));
    }