StorageUnitNotificationRegistrationRestController extends HerdBaseController { @RequestMapping(value = STORAGE_UNIT_NOTIFICATIONS_URI_PREFIX + "/namespaces/{namespace}/notificationNames/{notificationName}", method = RequestMethod.GET) @Secured(SecurityFunctions.FN_STORAGE_UNIT_NOTIFICATION_REGISTRATIONS_GET) public StorageUnitNotificationRegistration getStorageUnitNotificationRegistration(@PathVariable("namespace") String namespace, @PathVariable("notificationName") String notificationName) { return storageUnitNotificationRegistrationService.getStorageUnitNotificationRegistration(new NotificationRegistrationKey(namespace, notificationName)); }  @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 testGetStorageUnitNotificationRegistration() { NotificationRegistrationKey storageUnitNotificationRegistrationKey = new NotificationRegistrationKey(NAMESPACE, NOTIFICATION_NAME); StorageUnitNotificationRegistration storageUnitNotificationRegistration = new StorageUnitNotificationRegistration(ID, storageUnitNotificationRegistrationKey, NotificationEventTypeEntity.EventTypesStorageUnit.STRGE_UNIT_STTS_CHG.name(), new StorageUnitNotificationFilter(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, STORAGE_NAME, STORAGE_UNIT_STATUS, STORAGE_UNIT_STATUS_2), notificationRegistrationDaoTestHelper.getTestJobActions(), NotificationRegistrationStatusEntity.ENABLED); when(storageUnitNotificationRegistrationService.getStorageUnitNotificationRegistration(storageUnitNotificationRegistrationKey)) .thenReturn(storageUnitNotificationRegistration); StorageUnitNotificationRegistration resultStorageUnitNotificationRegistration = storageUnitNotificationRegistrationRestController.getStorageUnitNotificationRegistration(NAMESPACE, NOTIFICATION_NAME); verify(storageUnitNotificationRegistrationService).getStorageUnitNotificationRegistration(storageUnitNotificationRegistrationKey); verifyNoMoreInteractions(storageUnitNotificationRegistrationService); assertEquals(storageUnitNotificationRegistration, resultStorageUnitNotificationRegistration); }