@Test
public void customCredentialProvider() {

    CredentialsProvider customCredentialsProvider = new BasicCredentialsProvider();
    HttpClientConfig httpClientConfig = new HttpClientConfig.Builder("localhost")
            .credentialsProvider(customCredentialsProvider)
            .build();
    assertEquals(customCredentialsProvider, httpClientConfig.getCredentialsProvider());
}