@Test
public void testUpdateBusinessObjectDataRetentionInformation()
{

    // 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 delimited list of sub-partition values.
    String delimitedSubPartitionValues = String.join("|", SUBPARTITION_VALUES);
    // Create a business object data retention information update request.
    BusinessObjectDataRetentionInformationUpdateRequest businessObjectDataRetentionInformationUpdateRequest =
        new BusinessObjectDataRetentionInformationUpdateRequest(RETENTION_EXPIRATION_DATE);
    // Create a business object data.
    BusinessObjectData businessObjectData = new BusinessObjectData();
    businessObjectData.setId(ID);
    // Mock the external calls.
    when(herdStringHelper.splitStringWithDefaultDelimiterEscaped(delimitedSubPartitionValues)).thenReturn(SUBPARTITION_VALUES);
    when(businessObjectDataService.updateBusinessObjectDataRetentionInformation(businessObjectDataKey, businessObjectDataRetentionInformationUpdateRequest))
        .thenReturn(businessObjectData);
    // Call the method under test.
    BusinessObjectData result = businessObjectDataRestController
        .updateBusinessObjectDataRetentionInformation(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
            DATA_VERSION, delimitedSubPartitionValues, businessObjectDataRetentionInformationUpdateRequest);
    // Verify the external calls.
    verify(herdStringHelper).splitStringWithDefaultDelimiterEscaped(delimitedSubPartitionValues);
    verify(businessObjectDataService)
        .updateBusinessObjectDataRetentionInformation(businessObjectDataKey, businessObjectDataRetentionInformationUpdateRequest);
    verifyNoMoreInteractionsHelper();
    // Validate the results.
    assertEquals(businessObjectData, result);
}