@Override
    public void setConfigAttributes(Object attributes) {
        Map attributeMap = (Map) attributes;
        this.name = (String) attributeMap.get(EnvironmentVariableConfig.NAME);
        String value = (String) attributeMap.get(EnvironmentVariableConfig.VALUE);
        if (StringUtils.isBlank(name) && StringUtils.isBlank(value)) {
            throw new IllegalArgumentException(String.format("Need not null/empty name & value %s:%s", this.name, value));
        }
        this.isSecure = BooleanUtils.toBoolean((String) attributeMap.get(EnvironmentVariableConfig.SECURE));
        Boolean isChanged = BooleanUtils.toBoolean((String) attributeMap.get(EnvironmentVariableConfig.ISCHANGED));
        if (isSecure) {
            this.encryptedValue = isChanged ? new EncryptedVariableValueConfig(encrypt(value)) : new EncryptedVariableValueConfig(value);
        } else {
            this.value = new VariableValueConfig(value);
        }
        this.secretParamsForValue = parseSecretParams();
    }
@Test
    void shouldThrowUpWhenTheAttributeMapHasBothNameAndValueAreEmpty() {
        EnvironmentVariableConfig environmentVariableConfig = new EnvironmentVariableConfig((GoCipher) null);
        HashMap attrs = new HashMap();
        attrs.put(EnvironmentVariableConfig.VALUE, "");

        assertThatCode(() -> environmentVariableConfig.setConfigAttributes(attrs))
                .isInstanceOf(IllegalArgumentException.class);
    }