urn_perun_vo_attribute_def_def_toEmail extends VoAttributesModuleAbstract implements VoAttributesModuleImplApi { @Override public void checkAttributeSemantics(PerunSessionImpl sess, Vo vo, Attribute attribute) throws WrongReferenceAttributeValueException { if (attribute.getValue() == null) throw new WrongReferenceAttributeValueException(attribute, "Vo toEmail list cannot be null."); }  @Override void checkAttributeSyntax(PerunSessionImpl sess, Vo vo, Attribute attribute); @Override void checkAttributeSemantics(PerunSessionImpl sess, Vo vo, Attribute attribute); @Override AttributeDefinition getAttributeDefinition();  }
@Test(expected = WrongReferenceAttributeValueException.class) public void testCheckNullValue() throws Exception { System.out.println("testCheckNullValue()"); attributeToCheck.setValue(null); classInstance.checkAttributeSemantics(session, vo, attributeToCheck); }
@Test public void testCorrectSemantics() throws Exception { System.out.println("testCorrectSemantics()"); List<String> value = new ArrayList<>(); value.add(correctEmail); attributeToCheck.setValue(value); classInstance.checkAttributeSemantics(session, vo, attributeToCheck); }