@Test
public void testUpdateBusinessObjectFormatAttributes()
{

    List<Attribute> attributes = businessObjectDefinitionServiceTestHelper.getNewAttributes2();
    BusinessObjectFormat businessObjectFormat = new BusinessObjectFormat();
    businessObjectFormat.setAttributes(attributes);
    BusinessObjectFormatKey businessObjectFormatKey =
        new BusinessObjectFormatKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, INITIAL_FORMAT_VERSION);
    BusinessObjectFormatAttributesUpdateRequest request = new BusinessObjectFormatAttributesUpdateRequest(attributes);
    when(businessObjectFormatService.updateBusinessObjectFormatAttributes(businessObjectFormatKey, request)).thenReturn(businessObjectFormat);
    BusinessObjectFormat updatedBusinessObjectFormat = businessObjectFormatRestController
        .updateBusinessObjectFormatAttributes(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, INITIAL_FORMAT_VERSION, request);
    // Verify the external calls.
    verify(businessObjectFormatService).updateBusinessObjectFormatAttributes(businessObjectFormatKey, request);
    verifyNoMoreInteractions(businessObjectFormatService);
    // Validate the returned object.
    assertEquals(businessObjectFormat, updatedBusinessObjectFormat);
}