@Test
public void resolveVirtualAttributeValueChange2() throws Exception {

	setSchacHomeOrgs("muni.cz;cesnet.cz");
	String czech_republic = "Czech Republic";
	dnsMap.put(".cz", czech_republic);
	AttributeDefinition countries = classInstance.getAttributeDefinition();
	when(sess.getPerunBl().getAttributesManagerBl().getAttributeDefinition(sess, "urn:perun:user:attribute-def:virt:institutionsCountries"))
		.thenReturn(countries);
	Attribute newval = new Attribute(new urn_perun_entityless_attribute_def_def_dnsStateMapping().getAttributeDefinition());
	newval.setValue(czech_republic);
	when(sess.getPerunBl().getUsersManagerBl().findUsersWithExtSourceAttributeValueEnding(eq(sess), eq(SCHAC_HOME_ATTR_NAME), eq(".cz"), any()))
		.thenReturn(Collections.singletonList(user));
	AuditEvent event = new AttributeSetForKey(newval, ".cz");
	List<AuditEvent> msgs = classInstance.resolveVirtualAttributeValueChange(sess, event);
	assertTrue("audit should contain change of institutionsCountries",msgs.get(0).getMessage().contains("friendlyName=<institutionsCountries>"));
}