urn_perun_user_attribute_def_virt_sponsoredMembershipInOrganizations extends UserVirtualAttributesModuleAbstract implements UserVirtualAttributesModuleImplApi { @Override public Attribute getAttributeValue(PerunSessionImpl sess, User user, AttributeDefinition attributeDefinition) { Attribute attribute = new Attribute(attributeDefinition); attribute.setValue(getSponsorOrganizationIdentifiersFromGroups(sess, user)); return attribute; }  @Override Attribute getAttributeValue(PerunSessionImpl sess, User user, AttributeDefinition attributeDefinition); @Override List<String> getStrongDependencies(); @Override AttributeDefinition getAttributeDefinition();  }
@Test public void getAttributeValue() { ArrayList<String> attributeValue = classInstance.getAttributeValue(sess, user, sponsoredMembershipInOrganizationsAttrDef).valueAsList(); assertNotNull(attributeValue); assertEquals(2, attributeValue.size()); assertTrue(attributeValue.contains(value1)); assertTrue(attributeValue.contains(value2)); }