@Test
public void testGenerateBusinessObjectFormatDdl()
{

    BusinessObjectFormatDdl ddl = new BusinessObjectFormatDdl();
    ddl.setBusinessObjectDefinitionName(BDEF_NAME);
    ddl.setCustomDdlName(CUSTOM_DDL_NAME);
    ddl.setNamespace(NAMESPACE);
    ddl.setDdl(businessObjectFormatServiceTestHelper
        .getExpectedBusinessObjectFormatDdl(AbstractServiceTest.PARTITION_COLUMNS.length, AbstractServiceTest.FIRST_COLUMN_NAME,
            AbstractServiceTest.FIRST_COLUMN_DATA_TYPE, AbstractServiceTest.ROW_FORMAT, AbstractServiceTest.SCHEMA_CUSTOM_CLUSTERED_BY_VALUE,
            Hive13DdlGenerator.TEXT_HIVE_FILE_FORMAT, FileTypeEntity.TXT_FILE_TYPE, true, true));
    // Retrieve business object format ddl.
    BusinessObjectFormatDdlRequest request = businessObjectFormatServiceTestHelper.getTestBusinessObjectFormatDdlRequest(CUSTOM_DDL_NAME);
    when(businessObjectFormatService.generateBusinessObjectFormatDdl(request)).thenReturn(ddl);
    BusinessObjectFormatDdl resultDdl = businessObjectFormatRestController.generateBusinessObjectFormatDdl(request);
    // Verify the external calls.
    verify(businessObjectFormatService).generateBusinessObjectFormatDdl(request);
    verifyNoMoreInteractions(businessObjectFormatService);
    // Validate the returned object.
    assertEquals(ddl, resultDdl);
}