@Test
public void testGetBusinessObjectFormats()
{

    BusinessObjectDefinitionKey businessObjectDefinitionKey = new BusinessObjectDefinitionKey(NAMESPACE, BDEF_NAME);
    BusinessObjectFormatKeys businessObjectFormatKeys = new BusinessObjectFormatKeys(Arrays
        .asList(new BusinessObjectFormatKey(NAMESPACE, BDEF_NAME, DATA_PROVIDER_NAME, BDEF_DESCRIPTION, INITIAL_FORMAT_VERSION),
            new BusinessObjectFormatKey(NAMESPACE, BDEF_NAME, DATA_PROVIDER_NAME_2, BDEF_DESCRIPTION, INITIAL_FORMAT_VERSION)));
    when(businessObjectFormatService.getBusinessObjectFormats(businessObjectDefinitionKey, false)).thenReturn(businessObjectFormatKeys);
    // Retrieve a list of business object format keys for the specified business object definition.
    BusinessObjectFormatKeys resultKeys = businessObjectFormatRestController.getBusinessObjectFormats(NAMESPACE, BDEF_NAME, false);
    // Verify the external calls.
    verify(businessObjectFormatService).getBusinessObjectFormats(businessObjectDefinitionKey, false);
    verifyNoMoreInteractions(businessObjectFormatService);
    // Validate the returned object.
    assertEquals(businessObjectFormatKeys, resultKeys);
}