@Test
public void shouldLogIOExceptionsSilently() throws Exception {

    Socket socket = mock(Socket.class);
    HttpServletResponseImplFactory responseFactory = mock(HttpServletResponseImplFactory.class);
    when(responseFactory.createFromSocket(socket)).thenThrow(new IOException());
    ServerRunnable serverRunnable = new ServerRunnable(socket, mock(ServerConfig.class),
            mock(HttpServletRequestImplFactory.class),
            responseFactory,
            mock(HttpErrorHandlerResolver.class),
            new PathHelper()
    );
    serverRunnable.run();
    verify(socket, times(1)).close();
}