@Test
public void testIsPublic() throws Exception {

    int viewOpId = ReservedOperation.view.getId();
    int allGroupId = ReservedGroup.all.getId();
    try {
        setId(ReservedOperation.view, _viewOp.getId());
        setId(ReservedGroup.all, _allGroup.getId());
        Specification<OperationAllowed> isPublic = OperationAllowedSpecs.isPublic(ReservedOperation.view);
        List<OperationAllowed> found = _opAllowRepo.findAll(isPublic);
        assertEquals(1, found.size());
        assertEquals(_opAllowed1.getId(), found.get(0).getId());
    } finally {
        setId(ReservedOperation.view, viewOpId);
        setId(ReservedGroup.all, allGroupId);
    }
}