@Test
public void doStartSyncF_Unlinked_doLinkByEavAttribute_ChangeValue() {

	// call unlink
	this.doStartSyncB_Linked_doUnLinked();
	//
	AbstractSysSyncConfigDto syncConfigCustom = setSyncConfigForEav(SYNC_CONFIG_NAME);
	Assert.assertFalse(syncConfigService.isRunning(syncConfigCustom));
	//
	// Check state before sync
	IdmIdentityDto identityOne = identityService.getByUsername("x" + IDENTITY_USERNAME_ONE);
	IdmIdentityDto identityTwo = identityService.getByUsername("x" + IDENTITY_USERNAME_TWO);
	
	AccIdentityAccountFilter identityAccountFilterOne = new AccIdentityAccountFilter();
	identityAccountFilterOne.setIdentityId(identityOne.getId());
	Assert.assertEquals(0, identityAccoutnService.find(identityAccountFilterOne, null).getTotalElements());
	AccIdentityAccountFilter identityAccountFilterTwo = new AccIdentityAccountFilter();
	identityAccountFilterTwo.setIdentityId(identityTwo.getId());
	Assert.assertEquals(0, identityAccoutnService.find(identityAccountFilterTwo, null).getTotalElements());
	
	// change eav atttribute for identity two
	List<Serializable> list = new ArrayList<>();
	list.add("5");
	formService.saveValues(identityOne.getId(), IdmIdentity.class, EAV_ATTRIBUTE, list);
	
	// Start synchronization
	helper.startSynchronization(syncConfigCustom);

	//
	SysSyncLogFilter logFilter = new SysSyncLogFilter();
	logFilter.setSynchronizationConfigId(syncConfigCustom.getId());
	List<SysSyncLogDto> logs = syncLogService.find(logFilter, null).getContent();
	Assert.assertEquals(1, logs.size());
	SysSyncLogDto log = logs.get(0);
	// log.getSyncActionLogs();
	Assert.assertFalse(log.isRunning());
	Assert.assertFalse(log.isContainsError());
	SysSyncActionLogFilter actionLogFilter = new SysSyncActionLogFilter();
	actionLogFilter.setSynchronizationLogId(log.getId());
	List<SysSyncActionLogDto> actions = syncActionLogService.find(actionLogFilter, null).getContent();
	Assert.assertEquals(2, actions.size()); // LINK and MISSING_ENTITY
	SysSyncActionLogDto actionLog = actions.stream().filter(action -> {
		return SynchronizationActionType.MISSING_ENTITY == action.getSyncAction();
	}).findFirst().get();
	SysSyncItemLogFilter itemLogFilter = new SysSyncItemLogFilter();
	itemLogFilter.setSyncActionLogId(actionLog.getId());
	List<SysSyncItemLogDto> items = syncItemLogService.find(itemLogFilter, null).getContent();
	Assert.assertEquals(1, items.size());
	// Check state after sync
	Assert.assertEquals(0, identityAccoutnService.find(identityAccountFilterOne, null).getTotalElements());
	Assert.assertEquals(1, identityAccoutnService.find(identityAccountFilterTwo, null).getTotalElements());
	// Delete log
	syncLogService.delete(log);
}