@Test
public void testHasGroupId() {

    Specification<OperationAllowed> hasGroupId = OperationAllowedSpecs.hasGroupId(_intranetGroup.getId());
    List<OperationAllowed> found = _opAllowRepo.findAll(hasGroupId, new Sort(groupIdPath(), metadataIdPath()));
    assertEquals(found.size(), 3);
    assertEquals(_intranetGroup.getId(), found.get(0).getId().getGroupId());
    assertEquals(_intranetGroup.getId(), found.get(1).getId().getGroupId());
    assertEquals(_intranetGroup.getId(), found.get(2).getId().getGroupId());
    assertEquals(_viewOp.getId(), found.get(0).getId().getOperationId());
    assertEquals(_downloadOp.getId(), found.get(1).getId().getOperationId());
    assertEquals(_downloadOp.getId(), found.get(2).getId().getOperationId());
    assertEquals(_md1.getId(), found.get(0).getId().getMetadataId());
    assertEquals(_md1.getId(), found.get(1).getId().getMetadataId());
    assertEquals(_md2.getId(), found.get(2).getId().getMetadataId());
}