protected static String encrypt(String... args) throws Exception {
        int iterations = args.length == 2 ? Integer.parseInt(args[1]) : DEFAULT_ITERATIONS;
        EncryptionReplacer replacer = new EncryptionReplacer();
        String xmlPath = System.getProperty("hazelcast.config");
        Properties properties = xmlPath == null ? System.getProperties()
                : loadPropertiesFromConfig(new FileInputStream(xmlPath));
        replacer.init(properties);
        String encrypted = replacer.encrypt(args[0], iterations);
        String variable = "$" + replacer.getPrefix() + "{" + encrypted + "}";
        return variable;
    }
@Test
    public void testClientGenerateEncrypted() throws Exception {
        assumeDefaultAlgorithmsSupported();
        String xml = "<hazelcast-client xmlns=\"http://www.hazelcast.com/schema/client-config\">\n" + XML_DEFAULT_CONFIG
                + "</hazelcast-client>";
        File configFile = createFileWithString(xml);
        hazelcastConfigProperty.setOrClearProperty(configFile.getAbsolutePath());
        String encrypted = encrypt("test");
        assertThat(encrypted)
                .startsWith("$ENC{")
                .endsWith("}");
    }