### Question:
urn_perun_facility_attribute_def_virt_UIDRanges extends FacilityVirtualAttributesModuleAbstract implements FacilityVirtualAttributesModuleImplApi { @Override public void checkAttributeSemantics(PerunSessionImpl sess, Facility facility, Attribute attribute) throws WrongReferenceAttributeValueException, WrongAttributeAssignmentException { try { Attribute uidNamespaceAttribute = getUidNamespaceAttribute(sess, facility); if(uidNamespaceAttribute.getValue() == null) throw new WrongReferenceAttributeValueException(attribute, uidNamespaceAttribute, "There is missing UID namespace on the facility."); Attribute namespaceUIDRangesAttribute = getNamespaceUIDRangesAttribute(sess, uidNamespaceAttribute.valueAsString()); sess.getPerunBl().getAttributesManagerBl().checkAttributeSemantics(sess, uidNamespaceAttribute.valueAsString(), namespaceUIDRangesAttribute); } catch(WrongReferenceAttributeValueException ex) { throw new WrongReferenceAttributeValueException(attribute, ex.getReferenceAttribute()); } }  @Override void checkAttributeSemantics(PerunSessionImpl sess, Facility facility, Attribute attribute); @Override Attribute getAttributeValue(PerunSessionImpl sess, Facility facility, AttributeDefinition attributeDefinition); @Override void removeAttributeValue(PerunSessionImpl sess, Facility facility, AttributeDefinition attributeDefinition); @Override List<String> getDependencies(); @Override List<String> getStrongDependencies(); @Override AttributeDefinition getAttributeDefinition();  }### Answer:
@Test(expected = WrongReferenceAttributeValueException.class) public void testCheckAttributeSemanticsWithReqAttributeWithNullValue() throws Exception { System.out.println("testCheckAttributeSemanticsWithReqAttributeWithNullValue()"); reqAttribute.setValue(null); when(session.getPerunBl().getAttributesManagerBl().getAttribute(session, facility, AttributesManager.NS_FACILITY_ATTR_DEF + ":uid-namespace")).thenReturn(reqAttribute); classInstance.checkAttributeSemantics(session, facility, attributeToCheck); }
@Test public void testCheckAttributeSemanticsCorrect() throws Exception { System.out.println("testCheckAttributeSemanticsCorrect()"); reqAttribute.setValue("example"); when(session.getPerunBl().getAttributesManagerBl().getAttribute(session, facility, AttributesManager.NS_FACILITY_ATTR_DEF + ":uid-namespace")).thenReturn(reqAttribute); classInstance.checkAttributeSemantics(session, facility, attributeToCheck); }