test_class.declarator: mockBusinessObjectDataDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private BusinessObjectDataDao mockBusinessObjectDataDao;
test_class.type: BusinessObjectDataDao
test_class.var_name: mockBusinessObjectDataDao
test_class.declarator: mockBusinessObjectDataDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private BusinessObjectDataDaoHelper mockBusinessObjectDataDaoHelper;
test_class.type: BusinessObjectDataDaoHelper
test_class.var_name: mockBusinessObjectDataDaoHelper
test_class.declarator: mockBusinessObjectDataHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private BusinessObjectDataHelper mockBusinessObjectDataHelper;
test_class.type: BusinessObjectDataHelper
test_class.var_name: mockBusinessObjectDataHelper
test_class.declarator: cleanupDestroyedBusinessObjectDataService
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private CleanupDestroyedBusinessObjectDataServiceImpl cleanupDestroyedBusinessObjectDataService;
test_class.type: CleanupDestroyedBusinessObjectDataServiceImpl
test_class.var_name: cleanupDestroyedBusinessObjectDataService
test_class.declarator: mockNotificationEventService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private NotificationEventService mockNotificationEventService;
test_class.type: NotificationEventService
test_class.var_name: mockNotificationEventService
test_class.declarator: mockStorageUnitDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageUnitDao mockStorageUnitDao;
test_class.type: StorageUnitDao
test_class.var_name: mockStorageUnitDao
test_class.declarator: mockStorageUnitHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageUnitHelper mockStorageUnitHelper;
test_class.type: StorageUnitHelper
test_class.var_name: mockStorageUnitHelper
test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/impl/CleanupDestroyedBusinessObjectDataServiceImplTest.java
test_class.identifier: CleanupDestroyedBusinessObjectDataServiceImplTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void testCleanupS3StorageUnit()
      {
          // 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);
  
          // Create a storage unit key.
          BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey =
              new BusinessObjectDataStorageUnitKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                  SUBPARTITION_VALUES, DATA_VERSION, STORAGE_NAME);
  
          // Create mocks
          BusinessObjectDataEntity businessObjectDataEntity = mock(BusinessObjectDataEntity.class);
  
          // Mock the external calls.
          when(mockBusinessObjectDataHelper.createBusinessObjectDataKeyFromStorageUnitKey(businessObjectDataStorageUnitKey)).thenReturn(businessObjectDataKey);
          when(mockBusinessObjectDataDaoHelper.getBusinessObjectDataEntity(businessObjectDataKey)).thenReturn(businessObjectDataEntity);
          when(mockBusinessObjectDataHelper.getBusinessObjectDataKey(businessObjectDataEntity)).thenReturn(businessObjectDataKey);
          when(businessObjectDataEntity.getLatestVersion()).thenReturn(true);
          when(mockBusinessObjectDataDao.getBusinessObjectDataMaxVersion(businessObjectDataKey)).thenReturn(BUSINESS_OBJECT_DATA_MAX_VERSION);
          when(mockBusinessObjectDataDao.getBusinessObjectDataByAltKey(
              new BusinessObjectDataKey(businessObjectDataKey.getNamespace(), businessObjectDataKey.getBusinessObjectDefinitionName(),
                  businessObjectDataKey.getBusinessObjectFormatUsage(), businessObjectDataKey.getBusinessObjectFormatFileType(),
                  businessObjectDataKey.getBusinessObjectFormatVersion(), businessObjectDataKey.getPartitionValue(),
                  businessObjectDataKey.getSubPartitionValues(), BUSINESS_OBJECT_DATA_MAX_VERSION))).thenReturn(businessObjectDataEntity);
  
          // Call the method under test.
          cleanupDestroyedBusinessObjectDataService.cleanupS3StorageUnit(businessObjectDataStorageUnitKey);
  
          // Verify the external calls.
          verify(mockBusinessObjectDataHelper).createBusinessObjectDataKeyFromStorageUnitKey(businessObjectDataStorageUnitKey);
          verify(mockBusinessObjectDataDaoHelper).getBusinessObjectDataEntity(businessObjectDataKey);
  
          verify(businessObjectDataEntity).getStorageUnits();
  
          verify(mockBusinessObjectDataDao).delete(businessObjectDataEntity);
  
          verify(mockNotificationEventService)
              .processStorageUnitNotificationEventAsync(NotificationEventTypeEntity.EventTypesStorageUnit.STRGE_UNIT_STTS_CHG, businessObjectDataKey,
                  STORAGE_NAME, null, StorageUnitStatusEntity.DISABLED);
          verify(mockNotificationEventService)
              .processBusinessObjectDataNotificationEventAsync(NotificationEventTypeEntity.EventTypesBdata.BUS_OBJCT_DATA_STTS_CHG, businessObjectDataKey, null,
                  BusinessObjectDataStatusEntity.DELETED);
  
          verify(businessObjectDataEntity).getBusinessObjectDataChildren();
          verify(businessObjectDataEntity).getBusinessObjectDataParents();
  
          verify(businessObjectDataEntity).getLatestVersion();
          verify(mockBusinessObjectDataDao).getBusinessObjectDataMaxVersion(businessObjectDataKey);
          verify(mockBusinessObjectDataDao).getBusinessObjectDataByAltKey(
              new BusinessObjectDataKey(businessObjectDataKey.getNamespace(), businessObjectDataKey.getBusinessObjectDefinitionName(),
                  businessObjectDataKey.getBusinessObjectFormatUsage(), businessObjectDataKey.getBusinessObjectFormatFileType(),
                  businessObjectDataKey.getBusinessObjectFormatVersion(), businessObjectDataKey.getPartitionValue(),
                  businessObjectDataKey.getSubPartitionValues(), BUSINESS_OBJECT_DATA_MAX_VERSION));
  
          verify(businessObjectDataEntity).setLatestVersion(true);
          verify(mockBusinessObjectDataDao).saveAndRefresh(businessObjectDataEntity);
  
          verifyNoMoreInteractions(businessObjectDataEntity);
          verifyNoMoreInteractionsHelper();
      }
test_case.class_method_signature: CleanupDestroyedBusinessObjectDataServiceImplTest.testCleanupS3StorageUnit()
test_case.full_signature: @Test public void testCleanupS3StorageUnit()
test_case.identifier: testCleanupS3StorageUnit
test_case.invocations: mock thenReturn when createBusinessObjectDataKeyFromStorageUnitKey thenReturn when getBusinessObjectDataEntity thenReturn when getBusinessObjectDataKey thenReturn when getLatestVersion thenReturn when getBusinessObjectDataMaxVersion thenReturn when getBusinessObjectDataByAltKey getNamespace getBusinessObjectDefinitionName getBusinessObjectFormatUsage getBusinessObjectFormatFileType getBusinessObjectFormatVersion getPartitionValue getSubPartitionValues cleanupS3StorageUnit createBusinessObjectDataKeyFromStorageUnitKey verify getBusinessObjectDataEntity verify getStorageUnits verify delete verify processStorageUnitNotificationEventAsync verify processBusinessObjectDataNotificationEventAsync verify getBusinessObjectDataChildren verify getBusinessObjectDataParents verify getLatestVersion verify getBusinessObjectDataMaxVersion verify getBusinessObjectDataByAltKey verify getNamespace getBusinessObjectDefinitionName getBusinessObjectFormatUsage getBusinessObjectFormatFileType getBusinessObjectFormatVersion getPartitionValue getSubPartitionValues setLatestVersion verify saveAndRefresh verify verifyNoMoreInteractions verifyNoMoreInteractionsHelper
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCleanupS3StorageUnit()
focal_class.declarator: businessObjectDataDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private BusinessObjectDataDao businessObjectDataDao;
focal_class.type: BusinessObjectDataDao
focal_class.var_name: businessObjectDataDao
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: notificationEventService
focal_class.modifier: @Autowired
      @Lazy
      private
focal_class.original_string: @Autowired
      @Lazy
      private NotificationEventService notificationEventService;
focal_class.type: NotificationEventService
focal_class.var_name: notificationEventService
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: storageUnitHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageUnitHelper storageUnitHelper;
focal_class.type: StorageUnitHelper
focal_class.var_name: storageUnitHelper
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/impl/CleanupDestroyedBusinessObjectDataServiceImpl.java
focal_class.identifier: CleanupDestroyedBusinessObjectDataServiceImpl
focal_class.interfaces: implements CleanupDestroyedBusinessObjectDataService
focal_class.class_method_signature: CleanupDestroyedBusinessObjectDataServiceImpl.cleanupS3StorageUnit(BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey)
focal_class.full_signature: @PublishNotificationMessages @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public void cleanupS3StorageUnit(BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey)
focal_class.identifier: cleanupS3StorageUnit
focal_class.modifiers: @PublishNotificationMessages @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public
focal_class.parameters: (BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey)
focal_class.return: void
focal_class.signature: void cleanupS3StorageUnit(BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey)
focal_class.class_method_signature: CleanupDestroyedBusinessObjectDataServiceImpl.getS3StorageUnitsToCleanup(int maxResult)
focal_class.full_signature: @Override @Transactional(propagation = Propagation.NOT_SUPPORTED) public List<BusinessObjectDataStorageUnitKey> getS3StorageUnitsToCleanup(int maxResult)
focal_class.identifier: getS3StorageUnitsToCleanup
focal_class.modifiers: @Override @Transactional(propagation = Propagation.NOT_SUPPORTED) public
focal_class.parameters: (int maxResult)
focal_class.return: List<BusinessObjectDataStorageUnitKey>
focal_class.signature: List<BusinessObjectDataStorageUnitKey> getS3StorageUnitsToCleanup(int maxResult)
focal_class.class_method_signature: CleanupDestroyedBusinessObjectDataServiceImpl.cleanupS3StorageUnitImpl(BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey)
focal_class.full_signature:  void cleanupS3StorageUnitImpl(BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey)
focal_class.identifier: cleanupS3StorageUnitImpl
focal_class.parameters: (BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey)
focal_class.return: void
focal_class.signature: void cleanupS3StorageUnitImpl(BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey)
focal_class.class_method_signature: CleanupDestroyedBusinessObjectDataServiceImpl.getS3StorageUnitsToCleanupImpl(int maxResult)
focal_class.full_signature:  List<BusinessObjectDataStorageUnitKey> getS3StorageUnitsToCleanupImpl(int maxResult)
focal_class.identifier: getS3StorageUnitsToCleanupImpl
focal_class.parameters: (int maxResult)
focal_class.return: List<BusinessObjectDataStorageUnitKey>
focal_class.signature: List<BusinessObjectDataStorageUnitKey> getS3StorageUnitsToCleanupImpl(int maxResult)
focal_method.body: @PublishNotificationMessages
      @Override
      @Transactional(propagation = Propagation.REQUIRES_NEW)
      public void cleanupS3StorageUnit(BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey)
      {
          cleanupS3StorageUnitImpl(businessObjectDataStorageUnitKey);
      }
focal_method.class_method_signature: CleanupDestroyedBusinessObjectDataServiceImpl.cleanupS3StorageUnit(BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey)
focal_method.full_signature: @PublishNotificationMessages @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public void cleanupS3StorageUnit(BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey)
focal_method.identifier: cleanupS3StorageUnit
focal_method.invocations: cleanupS3StorageUnitImpl
focal_method.modifiers: @PublishNotificationMessages @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public
focal_method.parameters: (BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey)
focal_method.return: void
focal_method.signature: void cleanupS3StorageUnit(BusinessObjectDataStorageUnitKey businessObjectDataStorageUnitKey)