@Test
public void testHasGroupId() throws Exception {

    UserGroup ug1 = _repo.save(newUserGroup());
    _repo.save(newUserGroup());
    _repo.save(newUserGroup());
    _repo.save(newUserGroup());
    UserGroup found = _repo.findOne(hasGroupId(ug1.getId().getGroupId()));
    assertEquals(ug1.getId(), found.getId());
}