ApiKeyPairs.loginToEndpointAsUsernameInDomainWithPasswordAndReturnApiKeyPair(
URI.create(endpoint), "dummy-missing-user", "with-a-wrong-password", "");
}
private void checkLoginAsTheNewUser(String expectedUsername) {
LoginResponse response = globalAdminClient.getSessionClient().loginUserInDomainWithHashOfPassword(
expectedUsername, "", base16().lowerCase().encode(md5().hashString("password", UTF_8).asBytes()));
assertNotNull(response);
assertNotNull(response.getSessionKey());
assertNotNull(response.getJSessionId());
client.getSessionClient().logoutUser(response.getSessionKey());
}