urn_perun_facility_attribute_def_def_uid_namespace extends FacilityAttributesModuleAbstract implements FacilityAttributesModuleImplApi { @Override public void checkAttributeSemantics(PerunSessionImpl session, Facility facility, Attribute attribute) throws WrongReferenceAttributeValueException { if(attribute.getValue() == null) throw new WrongReferenceAttributeValueException(attribute, null, facility, null, "Missing uid namespace for facility."); String userFacilityUidNamespaceAttributeName = AttributesManager.NS_USER_ATTR_DEF + ":" + attribute.getFriendlyName() + ":" + attribute.getValue(); try { session.getPerunBl().getAttributesManagerBl().getAttributeDefinition(session, userFacilityUidNamespaceAttributeName); } catch (AttributeNotExistsException e) { throw new WrongReferenceAttributeValueException("Attribute " + userFacilityUidNamespaceAttributeName + " doesn't exists"); } }  @Override void checkAttributeSemantics(PerunSessionImpl session, Facility facility, Attribute attribute); @Override Attribute fillAttribute(PerunSessionImpl session, Facility facility, AttributeDefinition attribute); @Override AttributeDefinition getAttributeDefinition();  }
@Test(expected = WrongReferenceAttributeValueException.class) public void testCheckAttributeSemanticsWithNullValue() throws Exception { System.out.println("testCheckAttributeSemanticsWithNullValue()"); classInstance.checkAttributeSemantics(session, facility, attributeToCheck); }