public static String maskRegex(String input, String key, String name) {
        Map<String, Object> regexConfig = (Map<String, Object>) config.get(MASK_TYPE_REGEX);
        if (regexConfig != null) {
            Map<String, Object> keyConfig = (Map<String, Object>) regexConfig.get(key);
            if (keyConfig != null) {
                String regex = (String) keyConfig.get(name);
                if (regex != null && regex.length() > 0) {
                    return replaceWithMask(input, MASK_REPLACEMENT_CHAR.charAt(0), regex);
                }
            }
        }
        return input;
    }
@Test
    public void testMaskRequestHeader() {
        String testHeader1 = "test";
        String testHeader2 = "tests";
        String output1 = Mask.maskRegex(testHeader1, "requestHeader", "header1");
        System.out.println("output1 = " + output1);
        Assert.assertEquals(output1, "****");
        String output2 = Mask.maskRegex(testHeader2, "requestHeader", "header2");
        Assert.assertEquals(output2, "*****");
    }