static Map<String, List<String>> determineHeaders(final Exchange exchange) {
        final Message inboundMessage = exchange.getIn();

        final Map<String, Object> headers = inboundMessage.getHeaders();

        final Map<String, List<String>> answer = new HashMap<>();
        for (final String headerName : headers.keySet()) {
            final String headerNameLowercase = headerName.toLowerCase(Locale.US);
            if (headerNameLowercase.startsWith("sforce") || headerNameLowercase.startsWith("x-sfdc")) {
                final Object headerValue = inboundMessage.getHeader(headerName);

                if (headerValue instanceof String) {
                    answer.put(headerName, Collections.singletonList((String) headerValue));
                } else if (headerValue instanceof String[]) {
                    answer.put(headerName, Arrays.asList((String[]) headerValue));
                } else if (headerValue instanceof Collection) {
                    answer.put(headerName,
                            ((Collection<?>) headerValue).stream().map(String::valueOf).collect(Collectors.<String> toList()));
                } else {
                    throw new IllegalArgumentException(
                            "Given value for header `" + headerName + "`, is not String, String array or a Collection");
                }
            }
        }
        return answer;
    }
@Test
    public void shouldDetermineHeadersForRequest() {
        final CamelContext context = new DefaultCamelContext();

        final Exchange exchange = new DefaultExchange(context);
        final Message in = new DefaultMessage(context);
        in.setHeader("sforce-auto-assign", "TRUE");
        in.setHeader("SFORCE-CALL-OPTIONS", new String[] { "client=SampleCaseSensitiveToken/100", "defaultNamespace=battle" });
        in.setHeader("Sforce-Limit-Info", singletonList("per-app-api-usage"));
        in.setHeader("x-sfdc-packageversion-clientPackage", "1.0");
        in.setHeader("Sforce-Query-Options", "batchSize=1000");
        in.setHeader("Non-Related", "Header");
        exchange.setIn(in);

        final Map<String, List<String>> headers = AbstractClientBase.determineHeaders(exchange);

        assertThat(headers).containsOnly(entry("sforce-auto-assign", singletonList("TRUE")),
                entry("SFORCE-CALL-OPTIONS", asList("client=SampleCaseSensitiveToken/100", "defaultNamespace=battle")),
                entry("Sforce-Limit-Info", singletonList("per-app-api-usage")),
                entry("x-sfdc-packageversion-clientPackage", singletonList("1.0")),
                entry("Sforce-Query-Options", singletonList("batchSize=1000")));
    }