@Test(expected = BallException.class)
public void shouldThrowWhenIntermediateErrorResponse() {

    when(mRequest.isIntermediateResponseDelivered()).thenReturn(false);
    when(mResponse.isIntermediate()).thenReturn(true);
    when(mResponse.isSuccess()).thenReturn(false);
    when(mResponse.getResponseSource()).thenReturn(BallResponse.ResponseSource.LOCAL); // or cache, whatever
    mResponseDelivery.postResponse(mRequest, mResponse);
}