{
HashMap<String, Object> map = new HashMap<String, Object>();
{
map.clear();
ResteasyUriBuilder impl = (ResteasyUriBuilder) UriBuilder.fromPath("/foo/{id}");
map.put("id", "something %%20something");
URI uri = impl.buildFromMap(map);
Assert.assertEquals("/foo/something%20%25%2520something", uri.toString());
}
{
ResteasyUriBuilder impl = (ResteasyUriBuilder) UriBuilder.fromPath("/foo/{id}");
map.clear();
map.put("id", "something something");
URI uri = impl.buildFromMap(map);
Assert.assertEquals("/foo/something%20something", uri.toString());
}
{
ResteasyUriBuilder impl = (ResteasyUriBuilder) UriBuilder.fromPath("/foo/{id}");
map.clear();
map.put("id", "something%20something");
URI uri = impl.buildFromEncodedMap(map);
Assert.assertEquals("/foo/something%20something", uri.toString());
}
{
ResteasyUriBuilder impl = (ResteasyUriBuilder) UriBuilder.fromPath("/foo/{id}");
impl.substitutePathParam("id", "something %%20something", false);
URI uri = impl.build();
Assert.assertEquals("/foo/something%20%25%20something", uri.toString());
}
{
ResteasyUriBuilder impl = (ResteasyUriBuilder) UriBuilder.fromPath("/foo/{id}");
impl.substitutePathParam("id", "something something", false);
URI uri = impl.build();
Assert.assertEquals("/foo/something%20something", uri.toString());
}
{
ResteasyUriBuilder impl = (ResteasyUriBuilder) UriBuilder.fromPath("/foo/{id}");
impl.substitutePathParam("id", "something%20something", true);
URI uri = impl.build();
Assert.assertEquals("/foo/something%20something", uri.toString());
}
}