@Test
public void resolveVirtualAttributeValueChangeTest() throws Exception{

	System.out.println("urn_perun_user_facility_attribute_def_virt_defaultUnixGID.resolveVirtualAttributeValueChangeTest()");
	List<AuditEvent> resolvedEvents;
	//for message 1, 2 and 3
	when(session.getPerunBl().getMembersManagerBl().getMemberById(any(PerunSessionImpl.class), anyInt())).thenReturn(member);
	when(session.getPerunBl().getResourcesManagerBl().getResourceById(any(PerunSessionImpl.class), anyInt())).thenReturn(resource);
	when(session.getPerunBl().getAttributesManagerBl().getAttributeDefinition(any(PerunSessionImpl.class), anyString())).thenReturn(classInstance.getAttributeDefinition());
	resolvedEvents = classInstance.resolveVirtualAttributeValueChange(session, event1);
	assertEquals(resolvedEvents.size(), 1);
	assertEquals(resolvedEvents.get(0).getMessage(), isBanned.serializeToString() + " changed for " + resource.serializeToString() + " and " + member.serializeToString() + ".");
	resolvedEvents = classInstance.resolveVirtualAttributeValueChange(session, event2);
	assertEquals(resolvedEvents.get(0).getMessage(), isBanned.serializeToString() + " changed for " + resource.serializeToString() + " and " + member.serializeToString() + ".");
	resolvedEvents = classInstance.resolveVirtualAttributeValueChange(session, event3);
	assertEquals(resolvedEvents.get(0).getMessage(), isBanned.serializeToString() + " changed for " + resource.serializeToString() + " and " + member.serializeToString() + ".");
	//for message 4, 5 and 6
	when(session.getPerunBl().getUsersManagerBl().getUserById(any(PerunSessionImpl.class), anyInt())).thenReturn(user);
	when(session.getPerunBl().getFacilitiesManagerBl().getFacilityById(any(PerunSessionImpl.class), anyInt())).thenReturn(facility);
	when(session.getPerunBl().getFacilitiesManagerBl().getAssignedResources(any(PerunSessionImpl.class), any(Facility.class))).thenReturn(Collections.singletonList(resource));
	when(session.getPerunBl().getResourcesManagerBl().getAssignedMembers(any(PerunSessionImpl.class), any(Resource.class))).thenReturn(Collections.singletonList(member));
	resolvedEvents = classInstance.resolveVirtualAttributeValueChange(session, event4);
	assertEquals(resolvedEvents.get(0).getMessage(), isBanned.serializeToString() + " changed for " + resource.serializeToString() + " and " + member.serializeToString() + ".");
	resolvedEvents = classInstance.resolveVirtualAttributeValueChange(session, event5);
	assertEquals(resolvedEvents.get(0).getMessage(), isBanned.serializeToString() + " changed for " + resource.serializeToString() + " and " + member.serializeToString() + ".");
	resolvedEvents = classInstance.resolveVirtualAttributeValueChange(session, event6);
	assertEquals(resolvedEvents.get(0).getMessage(), isBanned.serializeToString() + " changed for " + resource.serializeToString() + " and " + member.serializeToString() + ".");
}