@Test
public void testGetNamespaces() throws Exception
{

    NamespaceKeys namespaceKeys = new NamespaceKeys(Arrays.asList(new NamespaceKey(NAMESPACE), new NamespaceKey(NAMESPACE_2)));
    when(namespaceService.getNamespaces()).thenReturn(namespaceKeys);
    // Retrieve a list of namespace keys.
    NamespaceKeys resultNamespaceKeys = namespaceRestController.getNamespaces();
    // Verify the external calls.
    verify(namespaceService).getNamespaces();
    verifyNoMoreInteractions(namespaceService);
    // Validate the returned object.
    assertEquals(namespaceKeys, resultNamespaceKeys);
}