assertEquals("varA", "a~b", result.getFirst("varA"));
}
public void testReservedMatch() {
UriTemplateProcessor template = new BitWorkingUriTemplateProcessor("/prefix/{varA}");
UriTemplateMatcher matcher = template.matcher();
MultivaluedMap<String, String> result = matcher.match("/prefix/a%3Ab");
assertNotNull("match ok :", result);
assertEquals("match size :", 1, result.size());
assertEquals("varA", "a%3Ab", result.getFirst("varA"));
// character ":" is reserved, however hp-soa requires to match it
result = matcher.match("/prefix/a:b");
assertNotNull("match ok :", result);
assertEquals("match size :", 1, result.size());
assertEquals("varA", "a:b", result.getFirst("varA"));
result = matcher.match("/prefix/a%2Fb");
assertNotNull("match ok /", result);
assertEquals("match size /", 1, result.size());
assertEquals("varA", "a%2Fb", result.getFirst("varA"));
result = matcher.match("/prefix/%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D");
assertNotNull("match ok ?#[]@!$&'()*+,;=", result);
assertEquals("match size ?#[]@!$&'()*+,;=", 1, result.size());
assertEquals("varA", "%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D", result
.getFirst("varA"));
}