@Test
public void testIsNotReserved() throws Exception {

    for (ReservedGroup reservedGroup : ReservedGroup.values()) {
        Group group = _repo.save(reservedGroup.getGroupEntityTemplate());
        final Field idField = ReflectionUtils.findField(ReservedGroup.class, "_id");
        idField.setAccessible(true);
        ReflectionUtils.setField(idField, reservedGroup, group.getId());
    }
    Group notReserved = _repo.save(GroupRepositoryTest.newGroup(_inc));
    List<Group> found = _repo.findAll(isReserved());
    assertEquals(ReservedGroup.values().length, found.size());
    for (Group group : found) {
        assertTrue(group.isReserved());
    }
    found = _repo.findAll(not(isReserved()));
    assertEquals(1, found.size());
    assertSameContents(notReserved, found.get(0));
}