@Test
public void executeShouldThrowRequestExceptionForAnyIOException() throws Exception {

    Request request = mock(Request.class);
    IOException expected = new IOException();
    mockStatic(HttpRequests.class);
    when(HttpRequests.toUrl(request)).thenThrow(expected);
    try {
        toTest.execute(request);
        fail();
    }catch(RequestException e){
        assertNull(e.getResponse());
        assertSame(expected, e.getCause());
    }
}