urn_perun_user_facility_attribute_def_def_shell_passwd_scp extends UserFacilityAttributesModuleAbstract implements UserFacilityAttributesModuleImplApi { @Override public void checkAttributeSemantics(PerunSessionImpl sess, User user, Facility facility, Attribute attribute) throws WrongReferenceAttributeValueException { if (attribute.valueAsString() == null) throw new WrongReferenceAttributeValueException(attribute, "Value can't be null"); }  @Override void checkAttributeSyntax(PerunSessionImpl sess, User user, Facility facility, Attribute attribute); @Override void checkAttributeSemantics(PerunSessionImpl sess, User user, Facility facility, Attribute attribute); @Override Attribute fillAttribute(PerunSessionImpl sess, User user, Facility facility, AttributeDefinition attributeDefinition); @Override AttributeDefinition getAttributeDefinition();  }
@Test(expected = WrongReferenceAttributeValueException.class) public void testSemanticsWithNullValue() throws Exception { System.out.println("testSemanticsWithNullValue()"); attributeToCheck.setValue(null); classInstance.checkAttributeSemantics(sess, user, facility, attributeToCheck); }
@Test public void testSemanticsCorrect() throws Exception { System.out.println("testSemanticsCorrect()"); attributeToCheck.setValue("/example"); classInstance.checkAttributeSemantics(sess, user, facility, attributeToCheck); }