public static String maskString(String input, String key) {
        if(input == null)
            return null;
        String output = input;
        Map<String, Object> stringConfig = (Map<String, Object>) config.get(MASK_TYPE_STRING);
        if (stringConfig != null) {
            Map<String, Object> keyConfig = (Map<String, Object>) stringConfig.get(key);
            if (keyConfig != null) {
                Set<String> patterns = keyConfig.keySet();
                for (String pattern : patterns) {
                    output = output.replaceAll(pattern, (String) keyConfig.get(pattern));
                }
            }
        }
        return output;
    }
@Test
    public void testMaskString() {
        String url1 = "/v1/customer?sin=123456789&password=secret&number=1234567890123456";
        String output = Mask.maskString(url1, "uri");
        System.out.println("ouput = " + output);
        Assert.assertEquals("/v1/customer?sin=masked&password=******&number=----------------", output);
    }