public static String encodeReferenceToken(final String s) {
        String encoded = s;
        for (Map.Entry<String,String> sub : SUBSTITUTIONS.entrySet()) {
            encoded = encoded.replace(sub.getKey(), sub.getValue());
        }
        return encoded;
    }
@Test
    public void testEncodeReferenceToken() {
        assertThat(JsonPointerUtils.encodeReferenceToken("com/vsv#...?"), is("com~1vsv~2~3~3~3~4"));
        assertThat(JsonPointerUtils.encodeReferenceToken("~1~2~01~3~4"), is("~01~02~001~03~04"));
    }