@Test
public void preemptiveAuthWithMultipleTargetHosts() {

    final Set<HttpHost> targetHosts = new HashSet<HttpHost>(Arrays.asList(
            new HttpHost("host1", 80, "http"),
            new HttpHost("host2", 81, "https")
    ));
    HttpClientConfig httpClientConfig = new HttpClientConfig.Builder("localhost")
            .defaultCredentials("someUser", "somePassword")
            .preemptiveAuthTargetHosts(new HashSet<HttpHost>(targetHosts))
            .build();
    assertThat(httpClientConfig.getPreemptiveAuthTargetHosts(), is(targetHosts));
}