public static String decodeReferenceToken(final String s) {
        String decoded = s;

        List<String> reverseOrderedKeys = new ArrayList<String>(SUBSTITUTIONS.keySet());
        Collections.reverse(reverseOrderedKeys);
        for (String key : reverseOrderedKeys) {
            decoded = decoded.replace(SUBSTITUTIONS.get(key), key);
        }

        return decoded;
    }
@Test
    public void testDecodeReferenceToken() {
        assertThat(JsonPointerUtils.decodeReferenceToken("com~1vsv~2~3~3~3~4"), is("com/vsv#...?"));
        assertThat(JsonPointerUtils.decodeReferenceToken("~01~02~001~03~04"), is("~1~2~01~3~4"));
    }