urn_perun_member_attribute_def_def_phone extends MemberAttributesModuleAbstract implements MemberAttributesModuleImplApi { @Override public void checkAttributeSemantics(PerunSessionImpl perunSession, Member member, Attribute attribute) throws WrongReferenceAttributeValueException { if (attribute.getValue() == null) throw new WrongReferenceAttributeValueException(attribute, "User attribute phone cannot be null."); }  void checkAttributeSyntax(PerunSessionImpl perunSession, Member member, Attribute attribute); @Override void checkAttributeSemantics(PerunSessionImpl perunSession, Member member, Attribute attribute); @Override void changedAttributeHook(PerunSessionImpl session, Member member, Attribute attribute); @Override AttributeDefinition getAttributeDefinition();  }
@Test(expected = WrongReferenceAttributeValueException.class) public void testCheckNull() throws Exception { System.out.println("testCheckNull()"); attributeToCheck.setValue(null); classInstance.checkAttributeSemantics(session, member, attributeToCheck); }
@Test public void testCorrectSemantics() throws Exception { System.out.println("testCorrectSemantics()"); attributeToCheck.setValue("+420123456789"); classInstance.checkAttributeSemantics(session, member, attributeToCheck); }