urn_perun_group_attribute_def_def_fromEmail extends GroupAttributesModuleAbstract implements GroupAttributesModuleImplApi { @Override public void checkAttributeSemantics(PerunSessionImpl sess, Group group, Attribute attribute) throws WrongReferenceAttributeValueException { if (attribute.getValue() == null) throw new WrongReferenceAttributeValueException(attribute, "Group fromEmail cannot be null."); }  @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 testNullValue() throws Exception { System.out.println("testNullValue()"); attributeToCheck.setValue(null); classInstance.checkAttributeSemantics(sess, group, attributeToCheck); }
@Test public void testCorrectSemantics() throws Exception { System.out.println("testCorrectSemantics()"); attributeToCheck.setValue("\"my example\" <my@example.com>"); classInstance.checkAttributeSemantics(sess, group, attributeToCheck); }