@Test
public void testGetUserByIdentityWhenExists() {

    configureWithInitialUsers();
    final String userIdentifier = UUID.randomUUID().toString();
    final String userIdentity = "user1";
    createUser(userIdentifier, userIdentity);
    final User retrievedUser1 = userGroupProvider.getUserByIdentity(userIdentity);
    assertNotNull(retrievedUser1);
    assertEquals(userIdentifier, retrievedUser1.getIdentifier());
    assertEquals(userIdentity, retrievedUser1.getIdentity());
}