@Test
public void resolveAttributeValueChangeTest() throws Exception {

	when(session.getPerunBl().getUsersManagerBl().getUserById(session, 1)).thenReturn(user);
	AuditEvent event = new AllAttributesRemovedForUserExtSource(ues1);
	List<AuditEvent> auditEvents = classInstance.resolveVirtualAttributeValueChange(session, event);
	assertEquals(auditEvents.get(0).getClass(), AttributeChangedForUser.class);
	event = new AllAttributesRemovedForUser(user);
	auditEvents = classInstance.resolveVirtualAttributeValueChange(session, event);
	assertEquals(auditEvents.get(0).getClass(), AttributeChangedForUser.class);
	Attribute attribute = new Attribute();
	attribute.setFriendlyName("eduPersonScopedAffiliationsManuallyAssigned");
	event = new AttributeSetForUser(attribute, user);
	auditEvents = classInstance.resolveVirtualAttributeValueChange(session, event);
	assertEquals(auditEvents.get(0).getClass(), AttributeChangedForUser.class);
	when(session.getPerunBl().getAttributesManagerBl().getAttribute(session, user, AttributesManager.NS_USER_ATTR_VIRT + ":" + "eduPersonScopedAffiliations")).thenReturn(attribute);
	auditEvents = classInstance.resolveVirtualAttributeValueChange(session, event);
	assertEquals(auditEvents.get(0).getClass(), AttributeChangedForUser.class);
}