test_class.declarator: attachmentManager
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private AttachmentManager attachmentManager;
test_class.type: AttachmentManager
test_class.var_name: attachmentManager
test_class.declarator: longRunningTaskManager
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private LongRunningTaskManager longRunningTaskManager;
test_class.type: LongRunningTaskManager
test_class.var_name: longRunningTaskManager
test_class.file: Realization/backend/example/src/test/java/eu/bcvsolutions/idm/example/bulk/action/impl/IdentityUsernameExportBulkActionTest.java
test_class.identifier: IdentityUsernameExportBulkActionTest
test_class.superclass: extends AbstractBulkActionTest
test_case.body: @Test
  	public void processBulkAction() throws IOException {
  		IdmBulkActionDto exampleAction = findBulkAction(IdmIdentity.class, IdentityUsernameExportBulkAction.BULK_ACTION_NAME);
  		
  		assertNotNull(exampleAction);
  		
  		IdmIdentityDto identity = getHelper().createIdentity();
  		IdmIdentityDto identity2 = getHelper().createIdentity();
  		IdmIdentityDto identity3 = getHelper().createIdentity();
  		
  		exampleAction.setIdentifiers(Sets.newHashSet(identity.getId(), identity2.getId(), identity3.getId()));
  		
  		IdmBulkActionDto processAction = bulkActionManager.processAction(exampleAction);
  		assertNotNull(processAction.getLongRunningTaskId());
  		IdmLongRunningTaskFilter context = new IdmLongRunningTaskFilter();
  		context.setIncludeItemCounts(true);
  		IdmLongRunningTaskDto longRunningTask = longRunningTaskService.get(processAction.getLongRunningTaskId(), context);
  
  		assertEquals(Long.valueOf(3), longRunningTask.getCount());
  		assertEquals(Long.valueOf(3), longRunningTask.getSuccessItemCount());
  		assertEquals(Long.valueOf(0), longRunningTask.getFailedItemCount());
  		assertEquals(Long.valueOf(0), longRunningTask.getWarningItemCount());
  
  		OperationResult result = longRunningTask.getResult();
  		ResultModel model = result.getModel();
  		assertNotNull(model);
  		assertEquals(206, model.getStatusCode());
  		assertEquals(CoreResultCode.LONG_RUNNING_TASK_PARTITIAL_DOWNLOAD.getCode(), model.getStatusEnum());
  
  		Map<String, Object> parameters = model.getParameters();
  		assertNotNull(parameters);
  		Object object = parameters.get(AttachableEntity.PARAMETER_ATTACHMENT_ID);
  		assertNotNull(object);
  		UUID fromString = UUID.fromString(object.toString());
  		assertNotNull(fromString);
  
  		IdmAttachmentDto attachmentDto = attachmentManager.get(fromString);
  		assertNotNull(attachmentDto);
  		assertEquals(longRunningTask.getId(), attachmentDto.getOwnerId());
  
  		IdmAttachmentDto attachmentForLongRunningTask = longRunningTaskManager.getAttachment(longRunningTask.getId(), attachmentDto.getId());
  		assertNotNull(attachmentForLongRunningTask);
  		assertEquals(attachmentDto.getId(), attachmentForLongRunningTask.getId());
  		
  		InputStream is = attachmentManager.getAttachmentData(attachmentDto.getId());
  		try {
  			String string = IOUtils.toString(is);
  			assertTrue(string.contains(identity.getUsername()));
  			assertTrue(string.contains(identity2.getUsername()));
  			assertTrue(string.contains(identity3.getUsername()));
  	
  			assertTrue(string.contains(IdmIdentity_.username.getName().toUpperCase()));
  			assertTrue(string.contains(IdmIdentity_.externalCode.getName().toUpperCase()));
  			assertTrue(string.contains(IdmIdentity_.state.getName().toUpperCase()));
  		} finally {
  			IOUtils.closeQuietly(is);
  		}
  	}
test_case.class_method_signature: IdentityUsernameExportBulkActionTest.processBulkAction()
test_case.full_signature: @Test public void processBulkAction()
test_case.identifier: processBulkAction
test_case.invocations: findBulkAction assertNotNull createIdentity getHelper createIdentity getHelper createIdentity getHelper setIdentifiers newHashSet getId getId getId processAction assertNotNull getLongRunningTaskId setIncludeItemCounts get getLongRunningTaskId assertEquals valueOf getCount assertEquals valueOf getSuccessItemCount assertEquals valueOf getFailedItemCount assertEquals valueOf getWarningItemCount getResult getModel assertNotNull assertEquals getStatusCode assertEquals getCode getStatusEnum getParameters assertNotNull get assertNotNull fromString toString assertNotNull get assertNotNull assertEquals getId getOwnerId getAttachment getId getId assertNotNull assertEquals getId getId getAttachmentData getId toString assertTrue contains getUsername assertTrue contains getUsername assertTrue contains getUsername assertTrue contains toUpperCase getName assertTrue contains toUpperCase getName assertTrue contains toUpperCase getName closeQuietly
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void processBulkAction()
focal_class.declarator: BULK_ACTION_NAME = "identity-username-export-bulk-action"
focal_class.modifier: public static final
focal_class.original_string: public static final String BULK_ACTION_NAME = "identity-username-export-bulk-action";
focal_class.type: String
focal_class.var_name: BULK_ACTION_NAME
focal_class.declarator: SPLIT_CHARACTER_CODE = "splitCharacter"
focal_class.modifier: private static final
focal_class.original_string: private static final String SPLIT_CHARACTER_CODE = "splitCharacter";
focal_class.type: String
focal_class.var_name: SPLIT_CHARACTER_CODE
focal_class.declarator: SPLIT_CHARACTER_DEFAULT_VALUE = ";"
focal_class.modifier: private static final
focal_class.original_string: private static final String SPLIT_CHARACTER_DEFAULT_VALUE = ";";
focal_class.type: String
focal_class.var_name: SPLIT_CHARACTER_DEFAULT_VALUE
focal_class.declarator: result
focal_class.modifier: private
focal_class.original_string: private StringBuilder result;
focal_class.type: StringBuilder
focal_class.var_name: result
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: attachmentManager
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private AttachmentManager attachmentManager;
focal_class.type: AttachmentManager
focal_class.var_name: attachmentManager
focal_class.file: Realization/backend/example/src/main/java/eu/bcvsolutions/idm/example/bulk/action/impl/IdentityUsernameExportBulkAction.java
focal_class.identifier: IdentityUsernameExportBulkAction
focal_class.class_method_signature: IdentityUsernameExportBulkAction.processEntities(Collection<UUID> entitiesId)
focal_class.full_signature: @Override protected OperationResult processEntities(Collection<UUID> entitiesId)
focal_class.identifier: processEntities
focal_class.modifiers: @Override protected
focal_class.parameters: (Collection<UUID> entitiesId)
focal_class.return: OperationResult
focal_class.signature: OperationResult processEntities(Collection<UUID> entitiesId)
focal_class.class_method_signature: IdentityUsernameExportBulkAction.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: IdentityUsernameExportBulkAction.end(OperationResult result, Exception ex)
focal_class.full_signature: @Override protected OperationResult end(OperationResult result, Exception ex)
focal_class.identifier: end
focal_class.modifiers: @Override protected
focal_class.parameters: (OperationResult result, Exception ex)
focal_class.return: OperationResult
focal_class.signature: OperationResult end(OperationResult result, Exception ex)
focal_class.class_method_signature: IdentityUsernameExportBulkAction.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: IdentityUsernameExportBulkAction.getSplitCharacterdAttribute()
focal_class.full_signature: protected IdmFormAttributeDto getSplitCharacterdAttribute()
focal_class.identifier: getSplitCharacterdAttribute
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: IdmFormAttributeDto
focal_class.signature: IdmFormAttributeDto getSplitCharacterdAttribute()
focal_class.class_method_signature: IdentityUsernameExportBulkAction.initStringBuilder()
focal_class.full_signature: private void initStringBuilder()
focal_class.identifier: initStringBuilder
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initStringBuilder()
focal_class.class_method_signature: IdentityUsernameExportBulkAction.getSplitCharacter()
focal_class.full_signature: private String getSplitCharacter()
focal_class.identifier: getSplitCharacter
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getSplitCharacter()
focal_class.class_method_signature: IdentityUsernameExportBulkAction.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: IdentityUsernameExportBulkAction.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: IdentityUsernameExportBulkAction.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: IdentityUsernameExportBulkAction.isRecoverable()
focal_class.full_signature: @Override public boolean isRecoverable()
focal_class.identifier: isRecoverable
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isRecoverable()
focal_class.superclass: extends AbstractBulkAction<IdmIdentityDto, IdmIdentityFilter>
focal_method.body: @Override
  	public String getName() {
  		return BULK_ACTION_NAME;
  	}
focal_method.class_method_signature: IdentityUsernameExportBulkAction.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()