InMemoryUserMaster extends AbstractInMemoryMaster<ManageableUser> implements UserMaster { @Override public UniqueId update(ManageableUser user) { ArgumentChecker.notNull(user, "user"); return super.update(user); } InMemoryUserMaster();  InMemoryUserMaster(final ObjectIdSupplier objectIdSupplier);  InMemoryUserMaster(final ObjectIdSupplier objectIdSupplier, final ChangeManager changeManager); @Override boolean nameExists(String userName); @Override ManageableUser getByName(String userName); @Override ManageableUser getById(ObjectId objectId); @Override UniqueId add(ManageableUser user); @Override UniqueId update(ManageableUser user); @Override UniqueId save(ManageableUser user); @Override void removeByName(String userName); @Override void removeById(ObjectId objectId); @Override UserSearchResult search(UserSearchRequest request); @Override UserEventHistoryResult eventHistory(UserEventHistoryRequest request); @Override UserAccount getAccount(String userName); @Override RoleMaster roleMaster(); @Override final ChangeManager changeManager(); @Override String toString(); static final String DEFAULT_OID_SCHEME; static final ManageableUser REMOVED; }
@Test(expectedExceptions = DataVersionException.class) public void test_update_badVersion() { ManageableUser updatedUser = addedUser1.clone(); updatedUser.setUniqueId(UniqueId.of("MemUsr", "1", "9")); master.update(updatedUser); }
@Test(expectedExceptions = DataDuplicationException.class) public void test_update_rename_alreadyExists() { ManageableUser updatedUser = addedUser1.clone(); updatedUser.setUserName(TEST_USER_2); master.update(updatedUser); }