@Test
public void testPrevalidationBulkAction() {

	IdmRoleDto role = getHelper().createRole();
	
	IdmBulkActionDto bulkAction = this.findBulkAction(IdmRole.class, RoleAccountManagementBulkAction.NAME);
	bulkAction.getIdentifiers().add(role.getId());
	
	// Warning message, role hasn't identity
	ResultModels resultModels = bulkActionManager.prevalidate(bulkAction);
	assertEquals(1, resultModels.getInfos().size());
	assertEquals(AccResultCode.ROLE_ACM_BULK_ACTION_NONE_IDENTITIES.getCode(), resultModels.getInfos().get(0).getStatusEnum());
	// Assign identity to role
	IdmIdentityDto identity = getHelper().createIdentity();
	getHelper().createIdentityRole(identity, role);
	
	// Info message, role has identity
	resultModels = bulkActionManager.prevalidate(bulkAction);
	assertEquals(1, resultModels.getInfos().size());
	assertEquals(AccResultCode.ROLE_ACM_BULK_ACTION_NUMBER_OF_IDENTITIES.getCode(), resultModels.getInfos().get(0).getStatusEnum());
}