CustomDdlRestController extends HerdBaseController { @RequestMapping(value = CUSTOM_DDLS_URI_PREFIX + "/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}" + "/businessObjectFormatVersions/{businessObjectFormatVersion}/customDdlNames/{customDdlName}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_CUSTOM_DDLS_DELETE) public CustomDdl deleteCustomDdl(@PathVariable("namespace") String namespace, @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName, @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage, @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType, @PathVariable("businessObjectFormatVersion") Integer businessObjectFormatVersion, @PathVariable("customDdlName") String customDdlName) { return customDdlService.deleteCustomDdl( new CustomDdlKey(namespace, businessObjectDefinitionName, businessObjectFormatUsage, businessObjectFormatFileType, businessObjectFormatVersion, customDdlName)); }  @RequestMapping(value = CUSTOM_DDLS_URI_PREFIX, method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_CUSTOM_DDLS_POST) CustomDdl createCustomDdl(@RequestBody CustomDdlCreateRequest request); @RequestMapping(value = CUSTOM_DDLS_URI_PREFIX + "/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}" + "/businessObjectFormatVersions/{businessObjectFormatVersion}/customDdlNames/{customDdlName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_CUSTOM_DDLS_GET) CustomDdl getCustomDdl(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType,
        @PathVariable("businessObjectFormatVersion") Integer businessObjectFormatVersion, @PathVariable("customDdlName") String customDdlName); @RequestMapping(value = CUSTOM_DDLS_URI_PREFIX + "/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}" + "/businessObjectFormatVersions/{businessObjectFormatVersion}/customDdlNames/{customDdlName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_CUSTOM_DDLS_PUT) CustomDdl updateCustomDdl(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType,
        @PathVariable("businessObjectFormatVersion") Integer businessObjectFormatVersion, @PathVariable("customDdlName") String customDdlName,
        @RequestBody CustomDdlUpdateRequest request); @RequestMapping(value = CUSTOM_DDLS_URI_PREFIX + "/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}" + "/businessObjectFormatVersions/{businessObjectFormatVersion}/customDdlNames/{customDdlName}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_CUSTOM_DDLS_DELETE) CustomDdl deleteCustomDdl(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType,
        @PathVariable("businessObjectFormatVersion") Integer businessObjectFormatVersion, @PathVariable("customDdlName") String customDdlName); @RequestMapping(value = CUSTOM_DDLS_URI_PREFIX + "/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}" + "/businessObjectFormatVersions/{businessObjectFormatVersion}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_CUSTOM_DDLS_ALL_GET) CustomDdlKeys getCustomDdls(@PathVariable("namespace") String namespace,
        @PathVariable("businessObjectDefinitionName") String businessObjectDefinitionName,
        @PathVariable("businessObjectFormatUsage") String businessObjectFormatUsage,
        @PathVariable("businessObjectFormatFileType") String businessObjectFormatFileType,
        @PathVariable("businessObjectFormatVersion") Integer businessObjectFormatVersion); static final String CUSTOM_DDLS_URI_PREFIX; }
@Test public void testDeleteCustomDdl() { CustomDdlKey customDdlKey = new CustomDdlKey(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, CUSTOM_DDL_NAME); CustomDdl customDdl = new CustomDdl(ID, customDdlKey, TEST_DDL); when(customDdlService.deleteCustomDdl(customDdlKey)).thenReturn(customDdl); CustomDdl deletedCustomDdl = customDdlRestController.deleteCustomDdl(NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, CUSTOM_DDL_NAME); customDdlServiceTestHelper .validateCustomDdl(customDdl.getId(), NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, CUSTOM_DDL_NAME, TEST_DDL, deletedCustomDdl); verify(customDdlService).deleteCustomDdl(customDdlKey); verifyNoMoreInteractions(customDdlService); assertEquals(customDdl, deletedCustomDdl); }