ExternalInterfaceRestController { @RequestMapping(value = EXTERNAL_INTERFACE_URI_PREFIX, method = RequestMethod.GET) @Secured(SecurityFunctions.FN_EXTERNAL_INTERFACES_ALL_GET) public ExternalInterfaceKeys getExternalInterfaces() { return externalInterfaceService.getExternalInterfaces(); }  @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 testGetExternalInterfaces() { ExternalInterfaceKeys externalInterfaceKeys = new ExternalInterfaceKeys(Arrays.asList(new ExternalInterfaceKey(EXTERNAL_INTERFACE), new ExternalInterfaceKey(EXTERNAL_INTERFACE_2))); when(externalInterfaceService.getExternalInterfaces()).thenReturn(externalInterfaceKeys); ExternalInterfaceKeys resultExternalInterfaceKeys = externalInterfaceRestController.getExternalInterfaces(); verify(externalInterfaceService).getExternalInterfaces(); verifyNoMoreInteractions(externalInterfaceService); assertEquals(externalInterfaceKeys, resultExternalInterfaceKeys); }