FnRequestHandler extends
	SimpleRequestHandler<FnRequestHandler.WrappedInput, FnRequestHandler.WrappedOutput> { @Override protected WrappedOutput onRequestFailure(Exception e, WrappedInput wrappedInput, @Nullable JRestlessContainerRequest jRestlessContainerRequest) { LOG.error("Request failed", e); OutputEvent outputEvent = OutputEvent.emptyResult(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()); return new WrappedOutput(outputEvent, null, Response.Status.INTERNAL_SERVER_ERROR); }  @Override JRestlessContainerRequest createContainerRequest(WrappedInput wrappedInput); RequestAndBaseUri getRequestAndBaseUri(InputEvent inputEvent); @FnConfiguration void setRuntimeContext(RuntimeContext rctx); final OutputEvent handleRequest(InputEvent inputEvent);  }
@Test public void testOnRequestFailure_ShouldReturnEmptyOutputEvent() { FnRequestHandler.WrappedInput wrappedInput = new FnRequestHandler.WrappedInput( new DefaultInputEvent().getInputEvent(), new ByteArrayInputStream(new byte[]{})); RuntimeException exception = new RuntimeException("Testing that onRequestFailure works"); FnRequestHandler.WrappedOutput output = requestHandler.onRequestFailure(exception, wrappedInput, null); assertFalse(output.getOutputEvent().isSuccess()); }