@Test
public void responseWithHeaders() throws Exception {

    when(mHttpStack.performRequest(REQUEST, ADDITIONAL_HEADERS)).thenReturn(mHttpResponse);
    when(mStatusLine.getStatusCode()).thenReturn(12345);
    when(mHttpResponse.getAllHeaders())
            .thenReturn(
                    new org.apache.http.Header[] {
                        new BasicHeader("header1", "value1_B"),
                        new BasicHeader("header3", "value3"),
                        new BasicHeader("HEADER2", "value2"),
                        new BasicHeader("header1", "value1_A")
                    });
    com.android.volley.toolbox.HttpResponse response =
            mAdaptedHttpStack.executeRequest(REQUEST, ADDITIONAL_HEADERS);
    assertEquals(12345, response.getStatusCode());
    assertNull(response.getContent());
    List<Header> expectedHeaders = new ArrayList<>();
    expectedHeaders.add(new Header("header1", "value1_B"));
    expectedHeaders.add(new Header("header3", "value3"));
    expectedHeaders.add(new Header("HEADER2", "value2"));
    expectedHeaders.add(new Header("header1", "value1_A"));
    assertEquals(expectedHeaders, response.getHeaders());
}