use of org.finra.herd.model.api.xml.BusinessObjectDataStatusUpdateRequest in project herd by FINRAOS.
the class BusinessObjectDataStatusServiceTest method testBusinessObjectDataStatusServiceMethodsNewTransactionPropagation.
/**
* This method is to get coverage for the business object data status service methods that have an explicit annotation for transaction propagation.
*/
@Test
public void testBusinessObjectDataStatusServiceMethodsNewTransactionPropagation() {
// 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);
// Try to retrieve a business object data status when specified business object data instance does not exist.
try {
businessObjectDataStatusServiceImpl.getBusinessObjectDataStatus(businessObjectDataKey, NO_PARTITION_KEY);
fail("Should throw an ObjectNotFoundException when not able to find business object data.");
} catch (ObjectNotFoundException e) {
assertEquals(businessObjectDataServiceTestHelper.getExpectedBusinessObjectDataNotFoundErrorMessage(businessObjectDataKey, NO_BDATA_STATUS), e.getMessage());
}
// Try to update a business object data status when specified business object data instance does not exist.
try {
businessObjectDataStatusServiceImpl.updateBusinessObjectDataStatus(businessObjectDataKey, new BusinessObjectDataStatusUpdateRequest(BDATA_STATUS_2));
fail("Should throw an ObjectNotFoundException when not able to find business object data.");
} catch (ObjectNotFoundException e) {
assertEquals(businessObjectDataServiceTestHelper.getExpectedBusinessObjectDataNotFoundErrorMessage(businessObjectDataKey, NO_BDATA_STATUS), e.getMessage());
}
}
Aggregations