@Test
public void testBasicAuthRequestConfig() {

    final String username = "user1";
    final String password = "password";
    final String basicCreds = username + ":" + password;
    final String expectedHeaderValue = "Basic " + Base64.getEncoder().encodeToString(basicCreds.getBytes(StandardCharsets.UTF_8));
    final RequestConfig requestConfig = new BasicAuthRequestConfig(username, password);
    final Map<String,String> headers = requestConfig.getHeaders();
    assertNotNull(headers);
    assertEquals(1, headers.size());
    final String authorizationHeaderValue = headers.get("Authorization");
    assertEquals(expectedHeaderValue, authorizationHeaderValue);
}