public static String maskJson(String input, String key) {
        if(input == null)
            return null;
        DocumentContext ctx = JsonPath.parse(input);
        return maskJson(ctx, key);
    }
@Test
    public void testMaskResponseBody() {
        String input =
                "{\"name\":\"Steve\",\n" +
                        "\"list\":[\n" +
                        "    {\"name\": \"Nick\"},\n" +
                        "    {\n" +
                        "        \"name\": \"Wen\",\n" +
                        "        \"accounts\": [\"1\", \"2\", \"3\"]\n" +
                        "    },\n" +
                        "    {\n" +
                        "        \"name\": \"Steve\",\n" +
                        "        \"accounts\": [\"4\", \"5\", \"666666\"]\n" +
                        "    },\n" +
                        "    \"secret1\", \"secret2\"],\n" +
                        "\"list1\": [\"1\", \"333\", \"55555\"],\n" +
                        "\"password\":\"secret\"}";
//        String input = "{\"name\":\"Steve\",\"list\":[\"secret1\", \"secret2\"],\"password\":\"secret\"}";
        String output = Mask.maskJson(input, "test2");
        System.out.println(output);
        Assert.assertEquals(JsonPath.parse(output).read("$.list[2].accounts[2]"), "******");
        Assert.assertEquals(JsonPath.parse(output).read("$.list[1].name"), "***");
        Assert.assertEquals(JsonPath.parse(output).read("$.list1[2]"), "*****");
        Assert.assertEquals(JsonPath.parse(output).read("$.password"), "******");
    }