test_class.declarator: identityRoleService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private IdmIdentityRoleService identityRoleService;
test_class.type: IdmIdentityRoleService
test_class.var_name: identityRoleService
test_class.declarator: identityService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private IdmIdentityService identityService;
test_class.type: IdmIdentityService
test_class.var_name: identityService
test_class.declarator: roleRequestService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private IdmRoleRequestService roleRequestService;
test_class.type: IdmRoleRequestService
test_class.var_name: roleRequestService
test_class.file: Realization/backend/core/core-impl/src/test/java/eu/bcvsolutions/idm/core/bulk/action/impl/IdentityRoleByIdentityDeduplicationBulkActionTest.java
test_class.identifier: IdentityRoleByIdentityDeduplicationBulkActionTest
test_class.superclass: extends AbstractBulkActionTest
test_case.body: @Test
  	public void testAutomaticAndManuallyAndContractCombination() {
  		String automaticRoleValue = "test" + System.currentTimeMillis();
  
  		IdmIdentityDto identity = getHelper().createIdentity(new GuardedString());
  		IdmIdentityContractDto primary = getHelper().getPrimeContract(identity);
  		IdmIdentityContractDto identityContactOne = getHelper().createContract(identity);
  		IdmIdentityContractDto identityContactTwo = getHelper().createContract(identity);
  
  		identity.setDescription(automaticRoleValue);
  		identity.setTitleAfter(automaticRoleValue);
  		identity.setTitleBefore(automaticRoleValue);
  		identity = identityService.save(identity);
  
  		IdmRoleDto role = getHelper().createRole();
  		
  		IdmIdentityRoleDto primaryOne = getHelper().createIdentityRole(primary, role);
  		IdmIdentityRoleDto contractOneOne = getHelper().createIdentityRole(identityContactOne, role);
  		IdmIdentityRoleDto contractOneTwo = getHelper().createIdentityRole(identityContactOne, role);
  		IdmIdentityRoleDto contractOneThree = getHelper().createIdentityRole(identityContactOne, role);
  		IdmIdentityRoleDto contractOneFour = getHelper().createIdentityRole(identityContactOne, role);
  		IdmIdentityRoleDto contractTwoOne = getHelper().createIdentityRole(identityContactTwo, role);
  		IdmIdentityRoleDto contractTwoTwo = getHelper().createIdentityRole(identityContactTwo, role);
  
  		IdmAutomaticRoleAttributeDto automaticRoleOne = getHelper().createAutomaticRole(role.getId());
  		getHelper().createAutomaticRoleRule(
  				automaticRoleOne.getId(),
  				AutomaticRoleAttributeRuleComparison.EQUALS,
  				AutomaticRoleAttributeRuleType.IDENTITY,
  				IdmIdentity_.description.getName(), null, automaticRoleValue);
  		
  		IdmAutomaticRoleAttributeDto automaticRoleTwo = getHelper().createAutomaticRole(role.getId());
  		getHelper().createAutomaticRoleRule(
  				automaticRoleTwo.getId(),
  				AutomaticRoleAttributeRuleComparison.EQUALS,
  				AutomaticRoleAttributeRuleType.IDENTITY,
  				IdmIdentity_.titleAfter.getName(), null, automaticRoleValue);
  		
  		IdmAutomaticRoleAttributeDto automaticRoleThree = getHelper().createAutomaticRole(role.getId());
  		getHelper().createAutomaticRoleRule(
  				automaticRoleThree.getId(),
  				AutomaticRoleAttributeRuleComparison.EQUALS,
  				AutomaticRoleAttributeRuleType.IDENTITY,
  				IdmIdentity_.titleBefore.getName(), null, automaticRoleValue);
  
  		getHelper().recalculateAutomaticRoleByAttribute(automaticRoleOne.getId());
  		getHelper().recalculateAutomaticRoleByAttribute(automaticRoleTwo.getId());
  		getHelper().recalculateAutomaticRoleByAttribute(automaticRoleThree.getId());
  
  		// 7 manually added and 9 automatically
  		List<IdmIdentityRoleDto> roles = identityRoleService.findAllByIdentity(identity.getId());
  		assertEquals(16, roles.size());
  
  		IdmBulkActionDto bulkAction = this.findBulkAction(IdmIdentity.class, IdentityRoleByIdentityDeduplicationBulkAction.NAME);
  		bulkAction.setIdentifiers(Sets.newHashSet(identity.getId()));
  		
  		IdmBulkActionDto processAction = bulkActionManager.processAction(bulkAction);
  		checkResultLrt(processAction, 1l, null, null);
  
  		roles = identityRoleService.findAllByIdentity(identity.getId());
  		assertEquals(9, roles.size());
  
  		roles = identityRoleService.findAllByContract(primary.getId());
  		assertEquals(3, roles.size());
  		for (IdmIdentityRoleDto identityRole : roles) {
  			assertNotEquals(primaryOne.getId(), identityRole.getId());
  		}
  
  		roles = identityRoleService.findAllByContract(primary.getId());
  		assertEquals(3, roles.size());
  		for (IdmIdentityRoleDto identityRole : roles) {
  			assertNotEquals(primaryOne.getId(), identityRole.getId());
  		}
  
  		roles = identityRoleService.findAllByContract(identityContactOne.getId());
  		assertEquals(3, roles.size());
  		for (IdmIdentityRoleDto identityRole : roles) {
  			assertNotEquals(contractOneOne.getId(), identityRole.getId());
  			assertNotEquals(contractOneTwo.getId(), identityRole.getId());
  			assertNotEquals(contractOneThree.getId(), identityRole.getId());
  			assertNotEquals(contractOneFour.getId(), identityRole.getId());
  		}
  
  		roles = identityRoleService.findAllByContract(identityContactTwo.getId());
  		assertEquals(3, roles.size());
  		for (IdmIdentityRoleDto identityRole : roles) {
  			assertNotEquals(contractTwoOne.getId(), identityRole.getId());
  			assertNotEquals(contractTwoTwo.getId(), identityRole.getId());
  		}
  	}
test_case.class_method_signature: IdentityRoleByIdentityDeduplicationBulkActionTest.testAutomaticAndManuallyAndContractCombination()
test_case.full_signature: @Test public void testAutomaticAndManuallyAndContractCombination()
test_case.identifier: testAutomaticAndManuallyAndContractCombination
test_case.invocations: currentTimeMillis createIdentity getHelper getPrimeContract getHelper createContract getHelper createContract getHelper setDescription setTitleAfter setTitleBefore save createRole getHelper createIdentityRole getHelper createIdentityRole getHelper createIdentityRole getHelper createIdentityRole getHelper createIdentityRole getHelper createIdentityRole getHelper createIdentityRole getHelper createAutomaticRole getHelper getId createAutomaticRoleRule getHelper getId getName createAutomaticRole getHelper getId createAutomaticRoleRule getHelper getId getName createAutomaticRole getHelper getId createAutomaticRoleRule getHelper getId getName recalculateAutomaticRoleByAttribute getHelper getId recalculateAutomaticRoleByAttribute getHelper getId recalculateAutomaticRoleByAttribute getHelper getId findAllByIdentity getId assertEquals size findBulkAction setIdentifiers newHashSet getId processAction checkResultLrt findAllByIdentity getId assertEquals size findAllByContract getId assertEquals size assertNotEquals getId getId findAllByContract getId assertEquals size assertNotEquals getId getId findAllByContract getId assertEquals size assertNotEquals getId getId assertNotEquals getId getId assertNotEquals getId getId assertNotEquals getId getId findAllByContract getId assertEquals size assertNotEquals getId getId assertNotEquals getId getId
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAutomaticAndManuallyAndContractCombination()
focal_class.declarator: NAME = "core-identity-role-by-identity-deduplication-bulk-action"
focal_class.modifier: public static final
focal_class.original_string: public static final String NAME = "core-identity-role-by-identity-deduplication-bulk-action";
focal_class.type: String
focal_class.var_name: NAME
focal_class.declarator: CHECK_SUBDEFINITION_CODE = "checkSubdefinition"
focal_class.modifier: public static final
focal_class.original_string: public static final String CHECK_SUBDEFINITION_CODE = "checkSubdefinition";
focal_class.type: String
focal_class.var_name: CHECK_SUBDEFINITION_CODE
focal_class.declarator: APPROVE_CODE = "approve"
focal_class.modifier: public static final
focal_class.original_string: public static final String APPROVE_CODE = "approve";
focal_class.type: String
focal_class.var_name: APPROVE_CODE
focal_class.declarator: identityService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private IdmIdentityService identityService;
focal_class.type: IdmIdentityService
focal_class.var_name: identityService
focal_class.declarator: identityRoleService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private IdmIdentityRoleService identityRoleService;
focal_class.type: IdmIdentityRoleService
focal_class.var_name: identityRoleService
focal_class.declarator: identityContractService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private IdmIdentityContractService identityContractService;
focal_class.type: IdmIdentityContractService
focal_class.var_name: identityContractService
focal_class.declarator: roleRequestService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private IdmRoleRequestService roleRequestService;
focal_class.type: IdmRoleRequestService
focal_class.var_name: roleRequestService
focal_class.declarator: conceptRoleRequestService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private IdmConceptRoleRequestService conceptRoleRequestService;
focal_class.type: IdmConceptRoleRequestService
focal_class.var_name: conceptRoleRequestService
focal_class.file: Realization/backend/core/core-impl/src/main/java/eu/bcvsolutions/idm/core/bulk/action/impl/IdentityRoleByIdentityDeduplicationBulkAction.java
focal_class.identifier: IdentityRoleByIdentityDeduplicationBulkAction
focal_class.class_method_signature: IdentityRoleByIdentityDeduplicationBulkAction.getService()
focal_class.full_signature: @Override public ReadWriteDtoService<IdmIdentityDto, IdmIdentityFilter> getService()
focal_class.identifier: getService
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: ReadWriteDtoService<IdmIdentityDto, IdmIdentityFilter>
focal_class.signature: ReadWriteDtoService<IdmIdentityDto, IdmIdentityFilter> getService()
focal_class.class_method_signature: IdentityRoleByIdentityDeduplicationBulkAction.getFormAttributes()
focal_class.full_signature: @Override public List<IdmFormAttributeDto> getFormAttributes()
focal_class.identifier: getFormAttributes
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<IdmFormAttributeDto>
focal_class.signature: List<IdmFormAttributeDto> getFormAttributes()
focal_class.class_method_signature: IdentityRoleByIdentityDeduplicationBulkAction.getName()
focal_class.full_signature: @Override public String getName()
focal_class.identifier: getName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: IdentityRoleByIdentityDeduplicationBulkAction.processDto(IdmIdentityDto dto)
focal_class.full_signature: @Override protected OperationResult processDto(IdmIdentityDto dto)
focal_class.identifier: processDto
focal_class.modifiers: @Override protected
focal_class.parameters: (IdmIdentityDto dto)
focal_class.return: OperationResult
focal_class.signature: OperationResult processDto(IdmIdentityDto dto)
focal_class.class_method_signature: IdentityRoleByIdentityDeduplicationBulkAction.getAuthoritiesForEntity()
focal_class.full_signature: @Override protected List<String> getAuthoritiesForEntity()
focal_class.identifier: getAuthoritiesForEntity
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> getAuthoritiesForEntity()
focal_class.class_method_signature: IdentityRoleByIdentityDeduplicationBulkAction.getAuthoritiesForIdentityRole()
focal_class.full_signature: private List<String> getAuthoritiesForIdentityRole()
focal_class.identifier: getAuthoritiesForIdentityRole
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> getAuthoritiesForIdentityRole()
focal_class.class_method_signature: IdentityRoleByIdentityDeduplicationBulkAction.getAuthoritiesForIdentityContract()
focal_class.full_signature: private List<String> getAuthoritiesForIdentityContract()
focal_class.identifier: getAuthoritiesForIdentityContract
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> getAuthoritiesForIdentityContract()
focal_class.class_method_signature: IdentityRoleByIdentityDeduplicationBulkAction.processDuplicitiesForContract(IdmIdentityContractDto contract)
focal_class.full_signature: private List<IdmConceptRoleRequestDto> processDuplicitiesForContract(IdmIdentityContractDto contract)
focal_class.identifier: processDuplicitiesForContract
focal_class.modifiers: private
focal_class.parameters: (IdmIdentityContractDto contract)
focal_class.return: List<IdmConceptRoleRequestDto>
focal_class.signature: List<IdmConceptRoleRequestDto> processDuplicitiesForContract(IdmIdentityContractDto contract)
focal_class.class_method_signature: IdentityRoleByIdentityDeduplicationBulkAction.getDuplicatesIdentityRoleForContract(IdmIdentityContractDto contract)
focal_class.full_signature: public List<IdmIdentityRoleDto> getDuplicatesIdentityRoleForContract(IdmIdentityContractDto contract)
focal_class.identifier: getDuplicatesIdentityRoleForContract
focal_class.modifiers: public
focal_class.parameters: (IdmIdentityContractDto contract)
focal_class.return: List<IdmIdentityRoleDto>
focal_class.signature: List<IdmIdentityRoleDto> getDuplicatesIdentityRoleForContract(IdmIdentityContractDto contract)
focal_class.class_method_signature: IdentityRoleByIdentityDeduplicationBulkAction.isApprove()
focal_class.full_signature: private boolean isApprove()
focal_class.identifier: isApprove
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isApprove()
focal_class.class_method_signature: IdentityRoleByIdentityDeduplicationBulkAction.isCheckSubdefinition()
focal_class.full_signature: private boolean isCheckSubdefinition()
focal_class.identifier: isCheckSubdefinition
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isCheckSubdefinition()
focal_class.class_method_signature: IdentityRoleByIdentityDeduplicationBulkAction.getApproveAttribute()
focal_class.full_signature: private IdmFormAttributeDto getApproveAttribute()
focal_class.identifier: getApproveAttribute
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: IdmFormAttributeDto
focal_class.signature: IdmFormAttributeDto getApproveAttribute()
focal_class.class_method_signature: IdentityRoleByIdentityDeduplicationBulkAction.getCheckSubdefinition()
focal_class.full_signature: private IdmFormAttributeDto getCheckSubdefinition()
focal_class.identifier: getCheckSubdefinition
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: IdmFormAttributeDto
focal_class.signature: IdmFormAttributeDto getCheckSubdefinition()
focal_class.class_method_signature: IdentityRoleByIdentityDeduplicationBulkAction.getOrder()
focal_class.full_signature: @Override public int getOrder()
focal_class.identifier: getOrder
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getOrder()
focal_class.class_method_signature: IdentityRoleByIdentityDeduplicationBulkAction.getLevel()
focal_class.full_signature: @Override public NotificationLevel getLevel()
focal_class.identifier: getLevel
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: NotificationLevel
focal_class.signature: NotificationLevel getLevel()
focal_class.superclass: extends AbstractBulkAction<IdmIdentityDto, IdmIdentityFilter>
focal_method.body: @Override
  	public String getName() {
  		return IdentityRoleByIdentityDeduplicationBulkAction.NAME;
  	}
focal_method.class_method_signature: IdentityRoleByIdentityDeduplicationBulkAction.getName()
focal_method.full_signature: @Override public String getName()
focal_method.identifier: getName
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: String
focal_method.signature: String getName()