static Map<String, String> determineHeadersFrom(final Response response) {
        final HttpFields headers = response.getHeaders();

        final Map<String, String> answer = new LinkedHashMap<>();
        for (final HttpField header : headers) {
            final String headerName = header.getName();

            if (headerName.startsWith("Sforce")) {
                answer.put(headerName, header.getValue());
            }
        }

        // don't set the response code to "0" and the response text to null if there's a response timeout
        if (response.getStatus() != 0) {
            answer.put(Exchange.HTTP_RESPONSE_CODE, String.valueOf(response.getStatus()));
            answer.put(Exchange.HTTP_RESPONSE_TEXT, response.getReason());
        }

        return answer;
    }
@Test
    public void shouldDetermineHeadersFromResponse() {
        final Response response = mock(Response.class);
        final HttpFields.Mutable httpHeaders = HttpFields.build();
        httpHeaders.add("Date", "Mon, 20 May 2013 22:21:46 GMT");
        httpHeaders.add("Sforce-Limit-Info", "api-usage=18/5000");
        httpHeaders.add("Last-Modified", "Mon, 20 May 2013 20:49:32 GMT");
        httpHeaders.add("Content-Type", "application/json;charset=UTF-8");
        httpHeaders.add("Transfer-Encoding", "chunked");

        when(response.getHeaders()).thenReturn(httpHeaders);
        final Map<String, String> headers = AbstractClientBase.determineHeadersFrom(response);

        assertThat(headers).containsEntry("Sforce-Limit-Info", "api-usage=18/5000");
    }