StorageUnitNotificationRegistrationRestController extends HerdBaseController { @RequestMapping(value = STORAGE_UNIT_NOTIFICATIONS_URI_PREFIX + "/namespaces/{namespace}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_STORAGE_UNIT_NOTIFICATION_REGISTRATIONS_BY_NAMESPACE_GET) public StorageUnitNotificationRegistrationKeys getStorageUnitNotificationRegistrationsByNamespace(@PathVariable("namespace") String namespace) { return storageUnitNotificationRegistrationService.getStorageUnitNotificationRegistrationsByNamespace(namespace); }  @RequestMapping(value = STORAGE_UNIT_NOTIFICATIONS_URI_PREFIX, method = RequestMethod.POST, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_STORAGE_UNIT_NOTIFICATION_REGISTRATIONS_POST) StorageUnitNotificationRegistration createStorageUnitNotificationRegistration(@RequestBody StorageUnitNotificationRegistrationCreateRequest request); @RequestMapping(value = STORAGE_UNIT_NOTIFICATIONS_URI_PREFIX + "/namespaces/{namespace}/notificationNames/{notificationName}", method = RequestMethod.DELETE) @Secured(SecurityFunctions.FN_STORAGE_UNIT_NOTIFICATION_REGISTRATIONS_DELETE) StorageUnitNotificationRegistration deleteStorageUnitNotification(@PathVariable("namespace") String namespace,
        @PathVariable("notificationName") String notificationName); @RequestMapping(value = STORAGE_UNIT_NOTIFICATIONS_URI_PREFIX + "/namespaces/{namespace}/notificationNames/{notificationName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_STORAGE_UNIT_NOTIFICATION_REGISTRATIONS_GET) StorageUnitNotificationRegistration getStorageUnitNotificationRegistration(@PathVariable("namespace") String namespace,
        @PathVariable("notificationName") String notificationName); @RequestMapping(value = STORAGE_UNIT_NOTIFICATIONS_URI_PREFIX + "/namespaces/{namespace}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_STORAGE_UNIT_NOTIFICATION_REGISTRATIONS_BY_NAMESPACE_GET) StorageUnitNotificationRegistrationKeys getStorageUnitNotificationRegistrationsByNamespace(@PathVariable("namespace") String namespace); @RequestMapping(value = STORAGE_UNIT_NOTIFICATIONS_URI_PREFIX, method = RequestMethod.GET) @Secured(SecurityFunctions.FN_STORAGE_UNIT_NOTIFICATION_REGISTRATIONS_BY_NOTIFICATION_FILTER_GET) StorageUnitNotificationRegistrationKeys getStorageUnitNotificationRegistrationsByNotificationFilter(
        @RequestParam(value = "businessObjectDefinitionNamespace", required = true) String businessObjectDefinitionNamespace,
        @RequestParam(value = "businessObjectDefinitionName", required = true) String businessObjectDefinitionName,
        @RequestParam(value = "businessObjectFormatUsage", required = false) String businessObjectFormatUsage,
        @RequestParam(value = "businessObjectFormatFileType", required = false) String businessObjectFormatFileType, ServletRequest servletRequest); @RequestMapping(value = STORAGE_UNIT_NOTIFICATIONS_URI_PREFIX + "/namespaces/{namespace}/notificationNames/{notificationName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_STORAGE_UNIT_NOTIFICATION_REGISTRATIONS_PUT) StorageUnitNotificationRegistration updateStorageUnitNotificationRegistration(@PathVariable("namespace") String namespace,
        @PathVariable("notificationName") String notificationName, @RequestBody StorageUnitNotificationRegistrationUpdateRequest request); static final String STORAGE_UNIT_NOTIFICATIONS_URI_PREFIX; }
@Test public void testGetStorageUnitNotificationRegistrationsByNamespace() { StorageUnitNotificationRegistrationKeys storageUnitNotificationRegistrationKeys = new StorageUnitNotificationRegistrationKeys(notificationRegistrationDaoTestHelper.getExpectedNotificationRegistrationKeys()); when(storageUnitNotificationRegistrationService.getStorageUnitNotificationRegistrationsByNamespace(NAMESPACE)) .thenReturn(storageUnitNotificationRegistrationKeys); StorageUnitNotificationRegistrationKeys resultStorageUnitNotificationRegistrationKeys = storageUnitNotificationRegistrationRestController.getStorageUnitNotificationRegistrationsByNamespace(NAMESPACE); verify(storageUnitNotificationRegistrationService).getStorageUnitNotificationRegistrationsByNamespace(NAMESPACE); verifyNoMoreInteractions(storageUnitNotificationRegistrationService); assertEquals(storageUnitNotificationRegistrationKeys, resultStorageUnitNotificationRegistrationKeys); }