@Test
public void testCheckResponseFailed() throws IOException {

    final int status = 500;
    Response response = mock(Response.class);
    ResponseProcessor<Object> processor = createProcessorMock();
    when(response.isSuccess()).thenReturn(Boolean.FALSE);
    when(response.statusCode()).thenReturn(status);
    ResponseProcessor<Object> checkProcessor = HttpUtils.checkResponse(processor);
    try {
        checkProcessor.process(response);
        fail("No exception thrown!");
    } catch (FailedRequestException e) {
        assertThat(e.getMessage()).contains(String.valueOf(status));
        assertThat(e.getStatusCode()).isEqualTo(status);
        assertThat(e.getTag()).isNull();
        verifyZeroInteractions(processor);
    }
}