KangarooException extends WebApplicationException { public final ErrorCode getCode() { return code; } protected  KangarooException(final ErrorCode code); final ErrorCode getCode();  }
@Test public void testGetCode() { KangarooException e = new TestError(); assertSame(TestError.CODE, e.getCode()); }
@Test public void testPlain() { KangarooException e = new TestError(); assertEquals(TestError.CODE.getHttpStatus().getStatusCode(), e.getResponse().getStatus()); assertEquals(e.getCode(), TestError.CODE); }