@Test
public void testGetBusinessObjectDataNotificationRegistrationsByNamespace()
{

    // Create notification registration keys.
    BusinessObjectDataNotificationRegistrationKeys businessObjectDataNotificationRegistrationKeys =
        new BusinessObjectDataNotificationRegistrationKeys(Arrays.asList(new NotificationRegistrationKey(NAMESPACE, NOTIFICATION_NAME)));
    // Mock the external calls.
    when(businessObjectDataNotificationRegistrationService.getBusinessObjectDataNotificationRegistrationsByNamespace(NAMESPACE))
        .thenReturn(businessObjectDataNotificationRegistrationKeys);
    // Call the method under test.
    BusinessObjectDataNotificationRegistrationKeys result =
        businessObjectDataNotificationRegistrationRestController.getBusinessObjectDataNotificationRegistrationsByNamespace(NAMESPACE);
    // Verify the external calls.
    verify(businessObjectDataNotificationRegistrationService).getBusinessObjectDataNotificationRegistrationsByNamespace(NAMESPACE);
    verifyNoMoreInteractionsHelper();
    // Validate the results.
    assertEquals(businessObjectDataNotificationRegistrationKeys, result);
}