@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()); }
if (evt.isSuccess()) { response = new BasicHttpResponse(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), evt.getStatus().getCode(), evt.getStatus().name())); } else {