assertTrue(null == repo.getCollection().findOne());
}
@Test
public void updateCenterUser() {
CenterUser user = getSecondFakeUser();
repo.insertCenterUser(user);
assertTrue(datastore.getDB().getLastError().get("err") == null);
user = repo.getFirstCenterUser();
assertNotNull(user);
Map fields = new HashMap(user.toMap());
fields.put("user-name", "max");
CenterUser updateUser = getCenterUserFactory().createUser(fields);
repo.updateCenterUser(updateUser);
assertTrue(datastore.getDB().getLastError().get("err") == null);
CenterUser retrieve = repo.getFirstCenterUser();;
assertNotNull(retrieve);
assertTrue(retrieve.getName().equals("max"));
repo.deleteCenterUser(retrieve.getId());
assertTrue(datastore.getDB().getLastError().get("err") == null);
assertTrue(null == repo.getCenterUser(user.getId(), user.getCenterId()));
}