@Test
public void getAttributeValue() throws Exception {

	// Set values of member organization attribute
	Attribute organization = perun.getAttributesManagerBl().getAttribute(sess, member, A_M_organization);
	organization.setValue("some value");
	perun.getAttributesManager().setAttribute(sess, member, organization);
	organization = perun.getAttributesManagerBl().getAttribute(sess, member2, A_M_organization);
	organization.setValue("different value");
	perun.getAttributesManager().setAttribute(sess, member2, organization);
	AttributeDefinition attr = new AttributeDefinition();
	attr.setNamespace(AttributesManager.NS_USER_ATTR_VIRT);
	attr.setFriendlyName("userOrganizations");
	attr.setType(HashMap.class.getName());
	Attribute attribute = new Attribute(attr);
	perun.getAttributesManager().createAttribute(sess, attribute);
	Map<String, String> value = classInstance.getAttributeValue((PerunSessionImpl) sess, user, attribute).valueAsMap();
	assertEquals("Attribute should have 2 elements.", 2, value.size());
	assertTrue("Attribute should contain short name of first vo as a key.", value.containsKey(vo.getShortName()));
	assertTrue("Attribute should contain short name of second vo as a key.", value.containsKey(vo2.getShortName()));
	assertEquals("some value should be a value to short name of first vo.", "some value", value.get(vo.getShortName()));
	assertEquals("different value should be a value to short name of second vo.", "different value", value.get(vo2.getShortName()));
}