assertNotNull(actual);
assertEquals(task.getId(), actual.getId());
assertEquals(template, actual.getUserTemplate());
assertEquals(new RoleTO(), actual.getRoleTemplate());
TaskExecTO execution = execSyncTask(actual.getId(), 20, false);
assertNotNull(execution.getStatus());
assertTrue(PropagationTaskExecStatus.valueOf(execution.getStatus()).isSuccessful());
UserTO userTO = userService.read("testuser1");
assertNotNull(userTO);
assertEquals("reconciled@syncope.apache.org", userTO.getAttributeMap().get("userId").getValues().get(0));
assertEquals("suspended", userTO.getStatus());
// enable user on external resource
JdbcTemplate jdbcTemplate = new JdbcTemplate(testDataSource);
jdbcTemplate.execute("UPDATE TEST SET STATUS=TRUE");
// re-execute the same SyncTask: now user must be active
execution = execSyncTask(actual.getId(), 20, false);
assertNotNull(execution.getStatus());
assertTrue(PropagationTaskExecStatus.valueOf(execution.getStatus()).isSuccessful());
userTO = userService.read("testuser1");
assertNotNull(userTO);
assertEquals("active", userTO.getStatus());
}