@Test
public void failedToTempFile_shouldThrowInternalError() throws Exception {

    ExecutionContext context = new ExecutionContext();
    context.addHandler((o, context1) -> {
        throw new TemporaryFileFailedException(new Throwable());
    });
    expectedException.expect(HttpErrorResponse.class);
    expectedException.expect(StatusCodeMatcher.isStatusCode(500));
    sut.handle(new Object(), context);
}