public static class Parsing_A_Invalid_URI {
@Test
public void itThrowsA400BadRequestWebApplicationException() throws Exception {
try {
new UriParam("/%dg");
fail("should have thrown a WebApplicationException but didn't");
} catch (WebApplicationException e) {
assertEquals(400, e.getResponse().getStatus());
assertEquals("Invalid parameter: /%dg (not a valid URI).", e.getResponse().getEntity());
}