@Test
public void testUpdateBusinessObjectFormatRetentionInformation()
{

    BusinessObjectFormatKey businessObjectFormatKey = new BusinessObjectFormatKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, null);
    BusinessObjectFormatRetentionInformationUpdateRequest updateRequest = new BusinessObjectFormatRetentionInformationUpdateRequest();
    updateRequest.setRetentionType(RetentionTypeEntity.PARTITION_VALUE);
    updateRequest.setRecordFlag(true);
    updateRequest.setRetentionPeriodInDays(RETENTION_PERIOD_DAYS);
    BusinessObjectFormat businessObjectFormat = new BusinessObjectFormat();
    when(businessObjectFormatService.updateBusinessObjectFormatRetentionInformation(businessObjectFormatKey, updateRequest))
        .thenReturn(businessObjectFormat);
    BusinessObjectFormat updatedBusinessObjectFormat = businessObjectFormatRestController
        .updateBusinessObjectFormatRetentionInformation(businessObjectFormatKey.getNamespace(), businessObjectFormatKey.getBusinessObjectDefinitionName(),
            businessObjectFormatKey.getBusinessObjectFormatUsage(), businessObjectFormatKey.getBusinessObjectFormatFileType(), updateRequest);
    // Verify the external calls.
    verify(businessObjectFormatService).updateBusinessObjectFormatRetentionInformation(businessObjectFormatKey, updateRequest);
    verifyNoMoreInteractions(businessObjectFormatService);
    // Validate the returned object.
    assertEquals(businessObjectFormat, updatedBusinessObjectFormat);
}