urn_perun_group_attribute_def_def_authoritativeGroup extends GroupAttributesModuleAbstract implements GroupAttributesModuleImplApi { @Override public void checkAttributeSemantics(PerunSessionImpl sess, Group group, Attribute attribute) throws WrongReferenceAttributeValueException { if (attribute.getValue() == null) return; if(group.getName().equals(VosManager.MEMBERS_GROUP)) throw new WrongReferenceAttributeValueException(attribute, null, group, null, "Members group is authoritative automatic, there is not allowed to set this attribute for members group."); }  @Override void checkAttributeSyntax(PerunSessionImpl sess, Group group, Attribute attribute); @Override void checkAttributeSemantics(PerunSessionImpl sess, Group group, Attribute attribute); @Override AttributeDefinition getAttributeDefinition();  }
@Test(expected = WrongReferenceAttributeValueException.class) public void testCheckMemberGroup() throws Exception { System.out.println("testCheckHighValue()"); attributeToCheck.setValue(1); group.setName(VosManager.MEMBERS_GROUP); classInstance.checkAttributeSemantics(sess, group, attributeToCheck); }