### Question:
BasicCredentials implements Credentials<HttpClientConfig.Builder> { @Override public void applyTo(HttpClientConfig.Builder builder) { BasicCredentialsProvider basicCredentialsProvider = new BasicCredentialsProvider(); basicCredentialsProvider.setCredentials( AuthScope.ANY, new UsernamePasswordCredentials(username, password) ); builder.credentialsProvider(basicCredentialsProvider); } protected  BasicCredentials(String username, String password); @Override void applyTo(HttpClientConfig.Builder builder); @PluginBuilderFactory static BasicCredentials.Builder newBuilder();  }### Answer:
@Test public void objectIsConfiguredWhenAllParamsAreSet() { BasicCredentials BasicCredentials = createTestBuilder() .withUsername(TEST_USER) .withPassword(TEST_PASSWORD) .build(); HttpClientConfig.Builder settings = spy(createDefaultClientConfigBuilder()); BasicCredentials.applyTo(settings); verify(settings).credentialsProvider((CredentialsProvider) notNull()); }