@Test
public void testUpdateUsers_shouldUpdateUser() throws NoSuchNodeException, MissingParentException,
    LdapInvalidAttributeValueException {

    User user = createTestUser();
    ldapService.updateUsers(Lists.newArrayList(user));
    Credential credential = user.getCredentials().iterator().next();
    credential.setValue(credential.getValue() + "new");
    Attribute attribute1 = user.getAttributes().iterator().next();
    attribute1.getValues().add("new");
    Attribute attribute2 = createTestAttribute("attribute2", "value");
    user.getAttributes().add(attribute2);
    ldapService.updateUsers(Lists.newArrayList(user));
    assertCredentialsCorrectlyStored(user);
    assertAttributesCorrectlyStored(user);
}