### Question:
DatabaseUserGroupProvider implements ConfigurableUserGroupProvider { @Override public User updateUser(final User user) throws AuthorizationAccessException { Validate.notNull(user); final String sql = "UPDATE UGP_USER SET IDENTITY = ? WHERE IDENTIFIER = ?"; final int updated = jdbcTemplate.update(sql, user.getIdentity(), user.getIdentifier()); if (updated <= 0) { return null; } return user; }  @AuthorizerContext void setDataSource(final DataSource dataSource); @AuthorizerContext void setIdentityMapper(final IdentityMapper identityMapper); @Override void initialize(final UserGroupProviderInitializationContext initializationContext); @Override void onConfigured(final AuthorizerConfigurationContext configurationContext); @Override void preDestruction(); @Override String getFingerprint(); @Override void inheritFingerprint(final String fingerprint); @Override void checkInheritability(final String proposedFingerprint); @Override User addUser(final User user); @Override User updateUser(final User user); @Override Set<User> getUsers(); @Override User getUser(final String identifier); @Override User getUserByIdentity(final String identity); @Override UserAndGroups getUserAndGroups(final String userIdentity); @Override User deleteUser(final User user); @Override Group addGroup(final Group group); @Override Group updateGroup(final Group group); @Override Set<Group> getGroups(); @Override Group getGroup(final String groupIdentifier); @Override Group deleteGroup(final Group group);  }### Answer:
@Test public void testUpdateUserWhenDoesNotExist() { configureWithInitialUsers(); final User user1 = new User.Builder().identifier(UUID.randomUUID().toString()).identity("user1").build(); final User updatedUser1 = userGroupProvider.updateUser(user1); assertNull(updatedUser1); }