@Test
public void testGetAllNamespaceAuthorizations()
{

    List<NamespaceKey> namespaceKeys = new ArrayList<>();
    namespaceKeys.add(new NamespaceKey(NAMESPACE_CODE));
    when(namespaceDao.getNamespaces()).thenReturn(namespaceKeys);
    List<NamespaceAuthorization> namespaceAuthorizations = new ArrayList<>(userNamespaceAuthorizationHelper.getAllNamespaceAuthorizations());
    assertThat(namespaceAuthorizations.get(0).getNamespace(), is(NAMESPACE_CODE));
    assertThat(namespaceAuthorizations.get(0).getNamespacePermissions().contains(NamespacePermissionEnum.EXECUTE), is(true));
    assertThat(namespaceAuthorizations.get(0).getNamespacePermissions().contains(NamespacePermissionEnum.GRANT), is(true));
    assertThat(namespaceAuthorizations.get(0).getNamespacePermissions().contains(NamespacePermissionEnum.READ), is(true));
    assertThat(namespaceAuthorizations.get(0).getNamespacePermissions().contains(NamespacePermissionEnum.WRITE), is(true));
    assertThat(namespaceAuthorizations.get(0).getNamespacePermissions().contains(NamespacePermissionEnum.WRITE_ATTRIBUTE), is(true));
    assertThat(namespaceAuthorizations.get(0).getNamespacePermissions().contains(NamespacePermissionEnum.WRITE_DESCRIPTIVE_CONTENT), is(true));
    verify(namespaceDao).getNamespaces();
    verifyNoMoreInteractions(namespaceDao, userNamespaceAuthorizationDao, wildcardHelper);
}