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