public static class Parsing_A_Invalid_Integer {
@Test
public void itThrowsA400BadRequestWebApplicationException() throws Exception {
try {
new IntegerParam("X#H");
fail("should have thrown a WebApplicationException but didn't");
} catch (WebApplicationException e) {
assertEquals(400, e.getResponse().getStatus());
assertEquals("Invalid parameter: X#H (not a valid integer).", e.getResponse().getEntity());
}