test_class.declarator: expectedException = ExpectedException.none()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public ExpectedException expectedException = ExpectedException.none();
test_class.type: ExpectedException
test_class.var_name: expectedException
test_class.declarator: businessObjectDataDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private BusinessObjectDataDaoHelper businessObjectDataDaoHelper;
test_class.type: BusinessObjectDataDaoHelper
test_class.var_name: businessObjectDataDaoHelper
test_class.declarator: businessObjectDataHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private BusinessObjectDataHelper businessObjectDataHelper;
test_class.type: BusinessObjectDataHelper
test_class.var_name: businessObjectDataHelper
test_class.declarator: businessObjectDataInitiateRestoreHelperServiceImpl
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private BusinessObjectDataInitiateRestoreHelperServiceImpl businessObjectDataInitiateRestoreHelperServiceImpl;
test_class.type: BusinessObjectDataInitiateRestoreHelperServiceImpl
test_class.var_name: businessObjectDataInitiateRestoreHelperServiceImpl
test_class.declarator: configurationHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ConfigurationHelper configurationHelper;
test_class.type: ConfigurationHelper
test_class.var_name: configurationHelper
test_class.declarator: herdStringHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private HerdStringHelper herdStringHelper;
test_class.type: HerdStringHelper
test_class.var_name: herdStringHelper
test_class.declarator: jsonHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private JsonHelper jsonHelper;
test_class.type: JsonHelper
test_class.var_name: jsonHelper
test_class.declarator: s3KeyPrefixHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private S3KeyPrefixHelper s3KeyPrefixHelper;
test_class.type: S3KeyPrefixHelper
test_class.var_name: s3KeyPrefixHelper
test_class.declarator: s3Service
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private S3Service s3Service;
test_class.type: S3Service
test_class.var_name: s3Service
test_class.declarator: storageFileHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageFileHelper storageFileHelper;
test_class.type: StorageFileHelper
test_class.var_name: storageFileHelper
test_class.declarator: storageHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageHelper storageHelper;
test_class.type: StorageHelper
test_class.var_name: storageHelper
test_class.declarator: storageUnitDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageUnitDao storageUnitDao;
test_class.type: StorageUnitDao
test_class.var_name: storageUnitDao
test_class.declarator: storageUnitDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageUnitDaoHelper storageUnitDaoHelper;
test_class.type: StorageUnitDaoHelper
test_class.var_name: storageUnitDaoHelper
test_class.declarator: storageUnitStatusDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageUnitStatusDaoHelper storageUnitStatusDaoHelper;
test_class.type: StorageUnitStatusDaoHelper
test_class.var_name: storageUnitStatusDaoHelper
test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/impl/BusinessObjectDataInitiateRestoreHelperServiceImplTest.java
test_class.identifier: BusinessObjectDataInitiateRestoreHelperServiceImplTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void testPrepareToInitiateRestoreWhitespacesArchiveRetrievalOption()
      {
          // Create an archive retrieval option with whitespaces
          String archiveRetrievalOption = "  " + Tier.Expedited.toString() + "  ";
  
          // Create a business object data key.
          BusinessObjectDataKey businessObjectDataKey =
              new BusinessObjectDataKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, SUBPARTITION_VALUES,
                  DATA_VERSION);
  
          BusinessObjectDataEntity businessObjectDataEntity = new BusinessObjectDataEntity();
  
          // Create a single storage unit
          StorageEntity storageEntity = new StorageEntity();
          storageEntity.setName(STORAGE_NAME);
          StorageUnitStatusEntity storageUnitStatusEntity = new StorageUnitStatusEntity();
          storageUnitStatusEntity.setCode(StorageUnitStatusEntity.ARCHIVED);
          StorageUnitEntity storageUnitEntity = new StorageUnitEntity();
          storageUnitEntity.setStorage(storageEntity);
          storageUnitEntity.setStatus(storageUnitStatusEntity);
          List<StorageUnitEntity> storageUnitEntities = Collections.singletonList(storageUnitEntity);
  
          List<StorageFile> storageFiles = Collections.singletonList(new StorageFile(S3_KEY, FILE_SIZE, ROW_COUNT));
          StorageUnitStatusEntity newStorageUnitStatusEntity = new StorageUnitStatusEntity();
          newStorageUnitStatusEntity.setCode(StorageUnitStatusEntity.RESTORING);
  
          // Mock the external calls.
          when(businessObjectDataDaoHelper.getBusinessObjectDataEntity(businessObjectDataKey)).thenReturn(businessObjectDataEntity);
          when(storageUnitDao.getStorageUnitsByStoragePlatformAndBusinessObjectData(StoragePlatformEntity.S3, businessObjectDataEntity))
              .thenReturn(storageUnitEntities);
          when(configurationHelper.getProperty(ConfigurationValue.S3_ATTRIBUTE_NAME_BUCKET_NAME))
              .thenReturn((String) ConfigurationValue.S3_ATTRIBUTE_NAME_BUCKET_NAME.getDefaultValue());
          when(storageHelper.getStorageAttributeValueByName((String) ConfigurationValue.S3_ATTRIBUTE_NAME_BUCKET_NAME.getDefaultValue(), storageEntity, true))
              .thenReturn(S3_BUCKET_NAME);
          when(s3KeyPrefixHelper.buildS3KeyPrefix(storageEntity, businessObjectDataEntity.getBusinessObjectFormat(), businessObjectDataKey))
              .thenReturn(S3_KEY_PREFIX);
          when(storageFileHelper.getAndValidateStorageFiles(storageUnitEntity, S3_KEY_PREFIX, STORAGE_NAME, businessObjectDataKey)).thenReturn(storageFiles);
          when(storageUnitStatusDaoHelper.getStorageUnitStatusEntity(StorageUnitStatusEntity.RESTORING)).thenReturn(newStorageUnitStatusEntity);
          when(businessObjectDataHelper.getBusinessObjectDataKey(businessObjectDataEntity)).thenReturn(businessObjectDataKey);
          when(configurationHelper.getProperty(ConfigurationValue.S3_ENDPOINT)).thenReturn(S3_ENDPOINT);
  
          // Make the archive retrieval option null
          BusinessObjectDataRestoreDto businessObjectDataRestoreDto =
              businessObjectDataInitiateRestoreHelperServiceImpl.prepareToInitiateRestore(businessObjectDataKey, EXPIRATION_IN_DAYS, archiveRetrievalOption);
  
          // Validate the businessObjectDataRestoreDto
          assertEquals(businessObjectDataKey, businessObjectDataRestoreDto.getBusinessObjectDataKey());
          assertEquals(STORAGE_NAME, businessObjectDataRestoreDto.getStorageName());
          assertEquals(S3_ENDPOINT, businessObjectDataRestoreDto.getS3Endpoint());
          assertEquals(S3_BUCKET_NAME, businessObjectDataRestoreDto.getS3BucketName());
          assertEquals(S3_KEY_PREFIX, businessObjectDataRestoreDto.getS3KeyPrefix());
          assertEquals(storageFiles, businessObjectDataRestoreDto.getStorageFiles());
          // Verify the whitespaces are trimmed
          assertEquals(Tier.Expedited.toString(), businessObjectDataRestoreDto.getArchiveRetrievalOption());
          assertEquals(StorageUnitStatusEntity.RESTORING, businessObjectDataRestoreDto.getNewStorageUnitStatus());
          assertEquals(StorageUnitStatusEntity.ARCHIVED, businessObjectDataRestoreDto.getOldStorageUnitStatus());
      }
test_case.class_method_signature: BusinessObjectDataInitiateRestoreHelperServiceImplTest.testPrepareToInitiateRestoreWhitespacesArchiveRetrievalOption()
test_case.full_signature: @Test public void testPrepareToInitiateRestoreWhitespacesArchiveRetrievalOption()
test_case.identifier: testPrepareToInitiateRestoreWhitespacesArchiveRetrievalOption
test_case.invocations: toString setName setCode setStorage setStatus singletonList singletonList setCode thenReturn when getBusinessObjectDataEntity thenReturn when getStorageUnitsByStoragePlatformAndBusinessObjectData thenReturn when getProperty getDefaultValue thenReturn when getStorageAttributeValueByName getDefaultValue thenReturn when buildS3KeyPrefix getBusinessObjectFormat thenReturn when getAndValidateStorageFiles thenReturn when getStorageUnitStatusEntity thenReturn when getBusinessObjectDataKey thenReturn when getProperty prepareToInitiateRestore assertEquals getBusinessObjectDataKey assertEquals getStorageName assertEquals getS3Endpoint assertEquals getS3BucketName assertEquals getS3KeyPrefix assertEquals getStorageFiles assertEquals toString getArchiveRetrievalOption assertEquals getNewStorageUnitStatus assertEquals getOldStorageUnitStatus
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPrepareToInitiateRestoreWhitespacesArchiveRetrievalOption()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(BusinessObjectDataInitiateRestoreHelperServiceImpl.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(BusinessObjectDataInitiateRestoreHelperServiceImpl.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: businessObjectDataDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private BusinessObjectDataDaoHelper businessObjectDataDaoHelper;
focal_class.type: BusinessObjectDataDaoHelper
focal_class.var_name: businessObjectDataDaoHelper
focal_class.declarator: businessObjectDataHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private BusinessObjectDataHelper businessObjectDataHelper;
focal_class.type: BusinessObjectDataHelper
focal_class.var_name: businessObjectDataHelper
focal_class.declarator: configurationHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ConfigurationHelper configurationHelper;
focal_class.type: ConfigurationHelper
focal_class.var_name: configurationHelper
focal_class.declarator: herdStringHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private HerdStringHelper herdStringHelper;
focal_class.type: HerdStringHelper
focal_class.var_name: herdStringHelper
focal_class.declarator: jsonHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private JsonHelper jsonHelper;
focal_class.type: JsonHelper
focal_class.var_name: jsonHelper
focal_class.declarator: s3KeyPrefixHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private S3KeyPrefixHelper s3KeyPrefixHelper;
focal_class.type: S3KeyPrefixHelper
focal_class.var_name: s3KeyPrefixHelper
focal_class.declarator: s3Service
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private S3Service s3Service;
focal_class.type: S3Service
focal_class.var_name: s3Service
focal_class.declarator: storageFileHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageFileHelper storageFileHelper;
focal_class.type: StorageFileHelper
focal_class.var_name: storageFileHelper
focal_class.declarator: storageHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageHelper storageHelper;
focal_class.type: StorageHelper
focal_class.var_name: storageHelper
focal_class.declarator: storageUnitDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageUnitDao storageUnitDao;
focal_class.type: StorageUnitDao
focal_class.var_name: storageUnitDao
focal_class.declarator: storageUnitDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageUnitDaoHelper storageUnitDaoHelper;
focal_class.type: StorageUnitDaoHelper
focal_class.var_name: storageUnitDaoHelper
focal_class.declarator: storageUnitStatusDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageUnitStatusDaoHelper storageUnitStatusDaoHelper;
focal_class.type: StorageUnitStatusDaoHelper
focal_class.var_name: storageUnitStatusDaoHelper
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/impl/BusinessObjectDataInitiateRestoreHelperServiceImpl.java
focal_class.identifier: BusinessObjectDataInitiateRestoreHelperServiceImpl
focal_class.interfaces: implements BusinessObjectDataInitiateRestoreHelperService
focal_class.class_method_signature: BusinessObjectDataInitiateRestoreHelperServiceImpl.executeInitiateRestoreAfterStep(BusinessObjectDataRestoreDto businessObjectDataRestoreDto)
focal_class.full_signature: @PublishNotificationMessages @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public BusinessObjectData executeInitiateRestoreAfterStep(BusinessObjectDataRestoreDto businessObjectDataRestoreDto)
focal_class.identifier: executeInitiateRestoreAfterStep
focal_class.modifiers: @PublishNotificationMessages @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public
focal_class.parameters: (BusinessObjectDataRestoreDto businessObjectDataRestoreDto)
focal_class.return: BusinessObjectData
focal_class.signature: BusinessObjectData executeInitiateRestoreAfterStep(BusinessObjectDataRestoreDto businessObjectDataRestoreDto)
focal_class.class_method_signature: BusinessObjectDataInitiateRestoreHelperServiceImpl.executeS3SpecificSteps(BusinessObjectDataRestoreDto businessObjectDataRestoreDto)
focal_class.full_signature: @Override @Transactional(propagation = Propagation.NOT_SUPPORTED) public void executeS3SpecificSteps(BusinessObjectDataRestoreDto businessObjectDataRestoreDto)
focal_class.identifier: executeS3SpecificSteps
focal_class.modifiers: @Override @Transactional(propagation = Propagation.NOT_SUPPORTED) public
focal_class.parameters: (BusinessObjectDataRestoreDto businessObjectDataRestoreDto)
focal_class.return: void
focal_class.signature: void executeS3SpecificSteps(BusinessObjectDataRestoreDto businessObjectDataRestoreDto)
focal_class.class_method_signature: BusinessObjectDataInitiateRestoreHelperServiceImpl.prepareToInitiateRestore(BusinessObjectDataKey businessObjectDataKey, Integer expirationInDays,
          String archiveRetrievalOption)
focal_class.full_signature: @PublishNotificationMessages @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public BusinessObjectDataRestoreDto prepareToInitiateRestore(BusinessObjectDataKey businessObjectDataKey, Integer expirationInDays,
          String archiveRetrievalOption)
focal_class.identifier: prepareToInitiateRestore
focal_class.modifiers: @PublishNotificationMessages @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public
focal_class.parameters: (BusinessObjectDataKey businessObjectDataKey, Integer expirationInDays,
          String archiveRetrievalOption)
focal_class.return: BusinessObjectDataRestoreDto
focal_class.signature: BusinessObjectDataRestoreDto prepareToInitiateRestore(BusinessObjectDataKey businessObjectDataKey, Integer expirationInDays,
          String archiveRetrievalOption)
focal_class.class_method_signature: BusinessObjectDataInitiateRestoreHelperServiceImpl.executeInitiateRestoreAfterStepImpl(BusinessObjectDataRestoreDto businessObjectDataRestoreDto)
focal_class.full_signature: protected BusinessObjectData executeInitiateRestoreAfterStepImpl(BusinessObjectDataRestoreDto businessObjectDataRestoreDto)
focal_class.identifier: executeInitiateRestoreAfterStepImpl
focal_class.modifiers: protected
focal_class.parameters: (BusinessObjectDataRestoreDto businessObjectDataRestoreDto)
focal_class.return: BusinessObjectData
focal_class.signature: BusinessObjectData executeInitiateRestoreAfterStepImpl(BusinessObjectDataRestoreDto businessObjectDataRestoreDto)
focal_class.class_method_signature: BusinessObjectDataInitiateRestoreHelperServiceImpl.executeS3SpecificStepsImpl(BusinessObjectDataRestoreDto businessObjectDataRestoreDto)
focal_class.full_signature: protected void executeS3SpecificStepsImpl(BusinessObjectDataRestoreDto businessObjectDataRestoreDto)
focal_class.identifier: executeS3SpecificStepsImpl
focal_class.modifiers: protected
focal_class.parameters: (BusinessObjectDataRestoreDto businessObjectDataRestoreDto)
focal_class.return: void
focal_class.signature: void executeS3SpecificStepsImpl(BusinessObjectDataRestoreDto businessObjectDataRestoreDto)
focal_class.class_method_signature: BusinessObjectDataInitiateRestoreHelperServiceImpl.getStorageUnit(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.full_signature: protected StorageUnitEntity getStorageUnit(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.identifier: getStorageUnit
focal_class.modifiers: protected
focal_class.parameters: (BusinessObjectDataEntity businessObjectDataEntity)
focal_class.return: StorageUnitEntity
focal_class.signature: StorageUnitEntity getStorageUnit(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.class_method_signature: BusinessObjectDataInitiateRestoreHelperServiceImpl.prepareToInitiateRestoreImpl(BusinessObjectDataKey businessObjectDataKey, Integer expirationInDays,
          String archiveRetrievalOption)
focal_class.full_signature: protected BusinessObjectDataRestoreDto prepareToInitiateRestoreImpl(BusinessObjectDataKey businessObjectDataKey, Integer expirationInDays,
          String archiveRetrievalOption)
focal_class.identifier: prepareToInitiateRestoreImpl
focal_class.modifiers: protected
focal_class.parameters: (BusinessObjectDataKey businessObjectDataKey, Integer expirationInDays,
          String archiveRetrievalOption)
focal_class.return: BusinessObjectDataRestoreDto
focal_class.signature: BusinessObjectDataRestoreDto prepareToInitiateRestoreImpl(BusinessObjectDataKey businessObjectDataKey, Integer expirationInDays,
          String archiveRetrievalOption)
focal_method.body: @PublishNotificationMessages
      @Override
      @Transactional(propagation = Propagation.REQUIRES_NEW)
      public BusinessObjectDataRestoreDto prepareToInitiateRestore(BusinessObjectDataKey businessObjectDataKey, Integer expirationInDays,
          String archiveRetrievalOption)
      {
          return prepareToInitiateRestoreImpl(businessObjectDataKey, expirationInDays, archiveRetrievalOption);
      }
focal_method.class_method_signature: BusinessObjectDataInitiateRestoreHelperServiceImpl.prepareToInitiateRestore(BusinessObjectDataKey businessObjectDataKey, Integer expirationInDays,
          String archiveRetrievalOption)
focal_method.full_signature: @PublishNotificationMessages @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public BusinessObjectDataRestoreDto prepareToInitiateRestore(BusinessObjectDataKey businessObjectDataKey, Integer expirationInDays,
          String archiveRetrievalOption)
focal_method.identifier: prepareToInitiateRestore
focal_method.invocations: prepareToInitiateRestoreImpl
focal_method.modifiers: @PublishNotificationMessages @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public
focal_method.parameters: (BusinessObjectDataKey businessObjectDataKey, Integer expirationInDays,
          String archiveRetrievalOption)
focal_method.return: BusinessObjectDataRestoreDto
focal_method.signature: BusinessObjectDataRestoreDto prepareToInitiateRestore(BusinessObjectDataKey businessObjectDataKey, Integer expirationInDays,
          String archiveRetrievalOption)