urn_perun_user_attribute_def_def_sshPublicAdminKey extends UserAttributesModuleAbstract implements UserAttributesModuleImplApi { @Override public void checkAttributeSemantics(PerunSessionImpl sess, User user, Attribute attribute) throws WrongReferenceAttributeValueException { if (attribute.getValue() == null) throw new WrongReferenceAttributeValueException(attribute, null, user, null, "Cant be null."); }  @Override void checkAttributeSyntax(PerunSessionImpl sess, User user, Attribute attribute); @Override void checkAttributeSemantics(PerunSessionImpl sess, User user, Attribute attribute); @Override AttributeDefinition getAttributeDefinition();  }
@Test(expected = WrongReferenceAttributeValueException.class) public void testCheckAttributeSemanticsWithNullValue() throws Exception { System.out.println("testCheckAttributeSemanticsWithNullValue()"); classInstance.checkAttributeSemantics(session, user, attributeToCheck); }
@Test public void testCheckAttributeSemanticsCorrect() throws Exception { System.out.println("testCheckAttributeSemanticsCorrect()"); List<String> value = new ArrayList<>(); value.add("my_example"); attributeToCheck.setValue(value); classInstance.checkAttributeSemantics(session, user, attributeToCheck); }