@Test
public void testUpdateBusinessObjectDataNotificationRegistration()
{

    // Create a notification registration key.
    NotificationRegistrationKey businessObjectDataNotificationRegistrationKey = new NotificationRegistrationKey(NAMESPACE, NOTIFICATION_NAME);
    // Create a business object data notification filter.
    BusinessObjectDataNotificationFilter businessObjectDataNotificationFilter =
        new BusinessObjectDataNotificationFilter(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, STORAGE_NAME,
            BDATA_STATUS, BDATA_STATUS_2);
    // Create a list of job actions.
    List<JobAction> jobActions = Arrays.asList(new JobAction(JOB_NAMESPACE, JOB_NAME, CORRELATION_DATA));
    // Create a business object data notification registration update request.
    BusinessObjectDataNotificationRegistrationUpdateRequest businessObjectDataNotificationRegistrationUpdateRequest =
        new BusinessObjectDataNotificationRegistrationUpdateRequest(NOTIFICATION_EVENT_TYPE, businessObjectDataNotificationFilter, jobActions,
            NOTIFICATION_REGISTRATION_STATUS);
    // Create a business object data notification registration.
    BusinessObjectDataNotificationRegistration businessObjectDataNotificationRegistration =
        new BusinessObjectDataNotificationRegistration(ID, businessObjectDataNotificationRegistrationKey, NOTIFICATION_EVENT_TYPE,
            businessObjectDataNotificationFilter, jobActions, NOTIFICATION_REGISTRATION_STATUS);
    // Mock the external calls.
    when(businessObjectDataNotificationRegistrationService.updateBusinessObjectDataNotificationRegistration(businessObjectDataNotificationRegistrationKey,
        businessObjectDataNotificationRegistrationUpdateRequest)).thenReturn(businessObjectDataNotificationRegistration);
    // Call the method under test.
    BusinessObjectDataNotificationRegistration result = businessObjectDataNotificationRegistrationRestController
        .updateBusinessObjectDataNotificationRegistration(NAMESPACE, NOTIFICATION_NAME, businessObjectDataNotificationRegistrationUpdateRequest);
    // Verify the external calls.
    verify(businessObjectDataNotificationRegistrationService)
        .updateBusinessObjectDataNotificationRegistration(businessObjectDataNotificationRegistrationKey,
            businessObjectDataNotificationRegistrationUpdateRequest);
    verifyNoMoreInteractionsHelper();
    // Validate the results.
    assertEquals(businessObjectDataNotificationRegistration, result);
}