@Override
    public String parseProperty(String key, String value, PropertiesLookup properties) {
        log.trace("Parsing property '{}={}'", key, value);
        if (value != null) {
            initEncryptor();
            Matcher matcher = PATTERN.matcher(value);
            while (matcher.find()) {
                if (log.isTraceEnabled()) {
                    log.trace("Decrypting part '{}'", matcher.group(0));
                }
                String decrypted = encryptor.decrypt(matcher.group(1));
                value = value.replace(matcher.group(0), decrypted);
            }
        }
        return value;
    }
@Test
    public void testDecryptsMultitplePartsOfPartiallyEncryptedProperty() {
        StringBuilder propertyValue = new StringBuilder();
        StringBuilder expected = new StringBuilder();

        for (int i = 0; i < 100; i++) {
            propertyValue.append(format("param%s=%s%s%s()&", i,
                    JASYPT_PREFIX_TOKEN, encryptor.encrypt("tiger" + i), JASYPT_SUFFIX_TOKEN));
            expected.append(format("param%s=tiger%s()&", i, i));
        }
        String result = jasyptPropertiesParser.parseProperty(KEY, propertyValue.toString(), null);
        assertThat(result, is(expected.toString()));
    }