@Test
public void shouldNotDeliverFinalErrorResponseWhenIntermediateIsNotYetDelivered() {

    VolleyError error = new VolleyError("Some error");
    when(mRequest.isIntermediateResponseDelivered()).thenReturn(false);
    when(mResponse.isIntermediate()).thenReturn(false);
    when(mResponse.isSuccess()).thenReturn(false);
    when(mResponse.getError()).thenReturn(error);
    when(mResponse.getResponseSource()).thenReturn(BallResponse.ResponseSource.NETWORK); // or cache, whatever
    mResponseDelivery.postResponse(mRequest, mResponse);
    verify(mRequest).addMarker(BallExecutorDelivery.MARKER_ERROR_IN_FINAL_RESPONSE_LET_INTERMEDIATE_CONTINUE);
    verify(mRequest, new LastInteraction()).setFinalResponseError(error);
    verify(mRequest, never()).deliverError(any(VolleyError.class));
}