WebActionRequestHandler extends SimpleRequestHandler<WebActionRequest, JsonObject> { @Override protected JsonObject onRequestFailure(Exception e, WebActionRequest request, JRestlessContainerRequest containerRequest) { LOG.error("request failed", e); return createJsonResponse(null, Collections.emptyMap(), Status.INTERNAL_SERVER_ERROR); }  JsonObject delegateJsonRequest(@Nonnull JsonObject request);  }
@Test public void onRequestFailure_ShouldCreate500() { JsonObject response = handler.onRequestFailure(null, null, null); assertEquals(createResponse(null, Collections.emptyMap(), Status.INTERNAL_SERVER_ERROR), response); }