@Test
public void testConstructorWithCredentials() {

    CredentialsProvider provider = new StaticCredentialsProvider(new Credentials(userName, userPassword));
    Credentials credentials = provider.getCredentials();
    assert userName.equals(credentials.getUsername());
    assert userPassword.equals(credentials.getPassword());
}