ExternalInterfaceRestController { @RequestMapping(value = EXTERNAL_INTERFACE_URI_PREFIX + "/{externalInterfaceName}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_EXTERNAL_INTERFACES_DELETE) public ExternalInterface deleteExternalInterface(@PathVariable("externalInterfaceName") String externalInterfaceName) { return externalInterfaceService.deleteExternalInterface(new ExternalInterfaceKey(externalInterfaceName)); }  @RequestMapping(value = EXTERNAL_INTERFACE_URI_PREFIX, method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_EXTERNAL_INTERFACES_POST) ExternalInterface createExternalInterface(@RequestBody ExternalInterfaceCreateRequest request); @RequestMapping(value = EXTERNAL_INTERFACE_URI_PREFIX + "/{externalInterfaceName}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_EXTERNAL_INTERFACES_DELETE) ExternalInterface deleteExternalInterface(@PathVariable("externalInterfaceName") String externalInterfaceName); @RequestMapping(value = EXTERNAL_INTERFACE_URI_PREFIX + "/{externalInterfaceName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_EXTERNAL_INTERFACES_GET) ExternalInterface getExternalInterface(@PathVariable("externalInterfaceName") String externalInterfaceName); @RequestMapping(value = EXTERNAL_INTERFACE_URI_PREFIX, method = RequestMethod.GET) @Secured(SecurityFunctions.FN_EXTERNAL_INTERFACES_ALL_GET) ExternalInterfaceKeys getExternalInterfaces(); @RequestMapping(value = EXTERNAL_INTERFACE_URI_PREFIX + "/{externalInterfaceName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_EXTERNAL_INTERFACES_PUT) ExternalInterface updateExternalInterface(@PathVariable("externalInterfaceName") String externalInterfaceName,
        @RequestBody ExternalInterfaceUpdateRequest request);  }
@Test public void testDeleteExternalInterface() { ExternalInterfaceKey externalInterfaceKey = new ExternalInterfaceKey(EXTERNAL_INTERFACE); ExternalInterface externalInterface = new ExternalInterface(externalInterfaceKey, DISPLAY_NAME_FIELD, DESCRIPTION); when(externalInterfaceService.deleteExternalInterface(new ExternalInterfaceKey(EXTERNAL_INTERFACE))).thenReturn(externalInterface); ExternalInterface deletedExternalInterface = externalInterfaceRestController.deleteExternalInterface(EXTERNAL_INTERFACE); verify(externalInterfaceService).deleteExternalInterface(new ExternalInterfaceKey(EXTERNAL_INTERFACE)); verifyNoMoreInteractions(externalInterfaceService); assertEquals(externalInterface, deletedExternalInterface); }