@Test
public void testDeleteNamespace() throws Exception
{

    Namespace namespace = new Namespace(NAMESPACE);
    when(namespaceService.deleteNamespace(new NamespaceKey(NAMESPACE))).thenReturn(namespace);
    // Delete this namespace.
    Namespace deletedNamespace = namespaceRestController.deleteNamespace(NAMESPACE);
    // Verify the external calls.
    verify(namespaceService).deleteNamespace(new NamespaceKey(NAMESPACE));
    verifyNoMoreInteractions(namespaceService);
    // Validate the returned object.
    assertEquals(namespace, deletedNamespace);
}