@Test
public void legacyRequestWithoutBody() throws Exception {

    BaseHttpStack stack =
            new BaseHttpStack() {
                @Override
                public HttpResponse executeRequest(
                        Request<?> request, Map<String, String> additionalHeaders)
                        throws IOException, AuthFailureError {
                    assertSame(REQUEST, request);
                    assertSame(ADDITIONAL_HEADERS, additionalHeaders);
                    return new HttpResponse(12345, Collections.<Header>emptyList());
                }
            };
    org.apache.http.HttpResponse resp = stack.performRequest(REQUEST, ADDITIONAL_HEADERS);
    assertEquals(12345, resp.getStatusLine().getStatusCode());
    assertEquals(0, resp.getAllHeaders().length);
    assertNull(resp.getEntity());
}