@Test
public void testGetCustomDdl()
{

    CustomDdl customDdl =
        new CustomDdl(ID, new CustomDdlKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, CUSTOM_DDL_NAME), TEST_DDL);
    CustomDdlKey customDdlKey = new CustomDdlKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, CUSTOM_DDL_NAME);
    when(customDdlService.getCustomDdl(customDdlKey)).thenReturn(customDdl);
    // Retrieve the custom DDL.
    CustomDdl resultCustomDdl =
        customDdlRestController.getCustomDdl(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, CUSTOM_DDL_NAME);
    // Validate the returned object.
    customDdlServiceTestHelper
        .validateCustomDdl(resultCustomDdl.getId(), NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, CUSTOM_DDL_NAME,
            TEST_DDL, resultCustomDdl);
    // Verify the external calls.
    verify(customDdlService).getCustomDdl(customDdlKey);
    verifyNoMoreInteractions(customDdlService);
    // Validate the returned object.
    assertEquals(customDdl, resultCustomDdl);
}