@Test
public void testUpdateBusinessObjectFormatSchemaBackwardsCompatibilityChanges()
{

    // Create a business object format key without version.
    BusinessObjectFormatKey businessObjectFormatKey =
        new BusinessObjectFormatKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, NO_FORMAT_VERSION);
    // Create a business object format schema backwards compatibility changes update request.
    BusinessObjectFormatSchemaBackwardsCompatibilityUpdateRequest businessObjectFormatSchemaBackwardsCompatibilityUpdateRequest =
        new BusinessObjectFormatSchemaBackwardsCompatibilityUpdateRequest(ALLOW_NON_BACKWARDS_COMPATIBLE_CHANGES_SET);
    // Create a business object format entity.
    BusinessObjectFormatEntity businessObjectFormatEntity = new BusinessObjectFormatEntity();
    // Create a business object format.
    BusinessObjectFormat businessObjectFormat = new BusinessObjectFormat();
    businessObjectFormat.setId(ID);
    // Mock the external calls.
    when(businessObjectFormatDaoHelper.getBusinessObjectFormatEntity(businessObjectFormatKey)).thenReturn(businessObjectFormatEntity);
    when(businessObjectFormatDao.saveAndRefresh(businessObjectFormatEntity)).thenReturn(businessObjectFormatEntity);
    when(businessObjectFormatHelper.createBusinessObjectFormatFromEntity(businessObjectFormatEntity)).thenReturn(businessObjectFormat);
    // Call the method under test.
    BusinessObjectFormat result = businessObjectFormatServiceImpl.updateBusinessObjectFormatSchemaBackwardsCompatibilityChanges(businessObjectFormatKey,
        businessObjectFormatSchemaBackwardsCompatibilityUpdateRequest);
    // Verify the external calls.
    verify(businessObjectFormatHelper).validateBusinessObjectFormatKey(businessObjectFormatKey, false);
    verify(businessObjectFormatDaoHelper).getBusinessObjectFormatEntity(businessObjectFormatKey);
    verify(businessObjectFormatDao).saveAndRefresh(businessObjectFormatEntity);
    verify(businessObjectFormatHelper).createBusinessObjectFormatFromEntity(businessObjectFormatEntity);
    verifyNoMoreInteractionsHelper();
    // Validate the results.
    assertEquals(businessObjectFormat, result);
    assertEquals(businessObjectFormatEntity.isAllowNonBackwardsCompatibleChanges(), ALLOW_NON_BACKWARDS_COMPATIBLE_CHANGES_SET);
}