urn_perun_facility_attribute_def_def_unixGID_namespace extends FacilityAttributesModuleAbstract implements FacilityAttributesModuleImplApi { @Override public void checkAttributeSemantics(PerunSessionImpl sess, Facility facility, Attribute attribute) throws WrongReferenceAttributeValueException { if(attribute.getValue() == null) throw new WrongReferenceAttributeValueException(attribute, "Attribute value can't be null"); try { sess.getPerunBl().getAttributesManagerBl().getAttributeDefinition(sess, AttributesManager.NS_RESOURCE_ATTR_DEF + ":unixGID-namespace:" + attribute.getValue()); sess.getPerunBl().getAttributesManagerBl().getAttributeDefinition(sess, AttributesManager.NS_GROUP_ATTR_DEF + ":unixGID-namespace:" + attribute.getValue()); } catch (AttributeNotExistsException e) { throw new WrongReferenceAttributeValueException(attribute, null, e); } }  @Override void checkAttributeSemantics(PerunSessionImpl sess, Facility facility, Attribute attribute); @Override AttributeDefinition getAttributeDefinition();  }
@Test(expected = WrongReferenceAttributeValueException.class) public void testCheckAttributeSemanticsWithNullValue() throws Exception { System.out.println("testCheckAttributeSemanticsWithNullValue()"); classInstance.checkAttributeSemantics(session, facility, attributeToCheck); }