@Test
public void testUpdateCustomDdl()
{

    CustomDdlUpdateRequest request = customDdlServiceTestHelper.createCustomDdlUpdateRequest(TEST_DDL_2);
    CustomDdlKey customDdlKey = new CustomDdlKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, CUSTOM_DDL_NAME);
    CustomDdl customDdl =
        new CustomDdl(ID, new CustomDdlKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, CUSTOM_DDL_NAME), TEST_DDL_2);
    when(customDdlService.updateCustomDdl(customDdlKey, request)).thenReturn(customDdl);
    // Update the custom DDL.
    CustomDdl updatedCustomDdl =
        customDdlRestController.updateCustomDdl(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, CUSTOM_DDL_NAME, request);
    // Verify the external calls.
    verify(customDdlService).updateCustomDdl(customDdlKey, request);
    verifyNoMoreInteractions(customDdlService);
    // Validate the returned object.
    assertEquals(customDdl, updatedCustomDdl);
}