test_class.declarator: userNamespaceAuthorizationHelper
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private UserNamespaceAuthorizationHelper userNamespaceAuthorizationHelper;
test_class.type: UserNamespaceAuthorizationHelper
test_class.var_name: userNamespaceAuthorizationHelper
test_class.declarator: namespaceDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private NamespaceDao namespaceDao;
test_class.type: NamespaceDao
test_class.var_name: namespaceDao
test_class.declarator: configurationHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ConfigurationHelper configurationHelper;
test_class.type: ConfigurationHelper
test_class.var_name: configurationHelper
test_class.declarator: userDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private UserDao userDao;
test_class.type: UserDao
test_class.var_name: userDao
test_class.declarator: userNamespaceAuthorizationDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private UserNamespaceAuthorizationDao userNamespaceAuthorizationDao;
test_class.type: UserNamespaceAuthorizationDao
test_class.var_name: userNamespaceAuthorizationDao
test_class.declarator: wildcardHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private WildcardHelper wildcardHelper;
test_class.type: WildcardHelper
test_class.var_name: wildcardHelper
test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/helper/UserNamespaceAuthorizationHelperTest.java
test_class.identifier: UserNamespaceAuthorizationHelperTest
test_case.body: @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);
      }
test_case.class_method_signature: UserNamespaceAuthorizationHelperTest.testGetAllNamespaceAuthorizations()
test_case.full_signature: @Test public void testGetAllNamespaceAuthorizations()
test_case.identifier: testGetAllNamespaceAuthorizations
test_case.invocations: add thenReturn when getNamespaces getAllNamespaceAuthorizations assertThat getNamespace get is assertThat contains getNamespacePermissions get is assertThat contains getNamespacePermissions get is assertThat contains getNamespacePermissions get is assertThat contains getNamespacePermissions get is assertThat contains getNamespacePermissions get is assertThat contains getNamespacePermissions get is getNamespaces verify verifyNoMoreInteractions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetAllNamespaceAuthorizations()
focal_class.declarator: configurationHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ConfigurationHelper configurationHelper;
focal_class.type: ConfigurationHelper
focal_class.var_name: configurationHelper
focal_class.declarator: namespaceDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private NamespaceDao namespaceDao;
focal_class.type: NamespaceDao
focal_class.var_name: namespaceDao
focal_class.declarator: userDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private UserDao userDao;
focal_class.type: UserDao
focal_class.var_name: userDao
focal_class.declarator: userNamespaceAuthorizationDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private UserNamespaceAuthorizationDao userNamespaceAuthorizationDao;
focal_class.type: UserNamespaceAuthorizationDao
focal_class.var_name: userNamespaceAuthorizationDao
focal_class.declarator: wildcardHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private WildcardHelper wildcardHelper;
focal_class.type: WildcardHelper
focal_class.var_name: wildcardHelper
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/helper/UserNamespaceAuthorizationHelper.java
focal_class.identifier: UserNamespaceAuthorizationHelper
focal_class.class_method_signature: UserNamespaceAuthorizationHelper.buildNamespaceAuthorizations(ApplicationUser applicationUser)
focal_class.full_signature: public void buildNamespaceAuthorizations(ApplicationUser applicationUser)
focal_class.identifier: buildNamespaceAuthorizations
focal_class.modifiers: public
focal_class.parameters: (ApplicationUser applicationUser)
focal_class.return: void
focal_class.signature: void buildNamespaceAuthorizations(ApplicationUser applicationUser)
focal_class.class_method_signature: UserNamespaceAuthorizationHelper.getAllNamespaceAuthorizations()
focal_class.full_signature: public Set<NamespaceAuthorization> getAllNamespaceAuthorizations()
focal_class.identifier: getAllNamespaceAuthorizations
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<NamespaceAuthorization>
focal_class.signature: Set<NamespaceAuthorization> getAllNamespaceAuthorizations()
focal_class.class_method_signature: UserNamespaceAuthorizationHelper.getNamespacePermissions(UserNamespaceAuthorizationEntity userNamespaceAuthorizationEntity)
focal_class.full_signature: public List<NamespacePermissionEnum> getNamespacePermissions(UserNamespaceAuthorizationEntity userNamespaceAuthorizationEntity)
focal_class.identifier: getNamespacePermissions
focal_class.modifiers: public
focal_class.parameters: (UserNamespaceAuthorizationEntity userNamespaceAuthorizationEntity)
focal_class.return: List<NamespacePermissionEnum>
focal_class.signature: List<NamespacePermissionEnum> getNamespacePermissions(UserNamespaceAuthorizationEntity userNamespaceAuthorizationEntity)
focal_class.class_method_signature: UserNamespaceAuthorizationHelper.getAllNamespacePermissions()
focal_class.full_signature: private List<NamespacePermissionEnum> getAllNamespacePermissions()
focal_class.identifier: getAllNamespacePermissions
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: List<NamespacePermissionEnum>
focal_class.signature: List<NamespacePermissionEnum> getAllNamespacePermissions()
focal_class.class_method_signature: UserNamespaceAuthorizationHelper.toNamespaceAuthorization(UserNamespaceAuthorizationEntity userNamespaceAuthorizationEntity)
focal_class.full_signature: private NamespaceAuthorization toNamespaceAuthorization(UserNamespaceAuthorizationEntity userNamespaceAuthorizationEntity)
focal_class.identifier: toNamespaceAuthorization
focal_class.modifiers: private
focal_class.parameters: (UserNamespaceAuthorizationEntity userNamespaceAuthorizationEntity)
focal_class.return: NamespaceAuthorization
focal_class.signature: NamespaceAuthorization toNamespaceAuthorization(UserNamespaceAuthorizationEntity userNamespaceAuthorizationEntity)
focal_class.class_method_signature: UserNamespaceAuthorizationHelper.isNamespaceAuthorizationAdmin(String userId)
focal_class.full_signature: protected boolean isNamespaceAuthorizationAdmin(String userId)
focal_class.identifier: isNamespaceAuthorizationAdmin
focal_class.modifiers: protected
focal_class.parameters: (String userId)
focal_class.return: boolean
focal_class.signature: boolean isNamespaceAuthorizationAdmin(String userId)
focal_method.body: public Set<NamespaceAuthorization> getAllNamespaceAuthorizations()
      {
          Set<NamespaceAuthorization> namespaceAuthorizations = new LinkedHashSet<>();
  
          List<NamespaceKey> namespaceKeys = namespaceDao.getNamespaces();
          for (NamespaceKey namespaceKey : namespaceKeys)
          {
              NamespaceAuthorization namespaceAuthorization = new NamespaceAuthorization();
              namespaceAuthorizations.add(namespaceAuthorization);
              namespaceAuthorization.setNamespace(namespaceKey.getNamespaceCode());
              namespaceAuthorization.setNamespacePermissions(getAllNamespacePermissions());
          }
  
          return namespaceAuthorizations;
      }
focal_method.class_method_signature: UserNamespaceAuthorizationHelper.getAllNamespaceAuthorizations()
focal_method.full_signature: public Set<NamespaceAuthorization> getAllNamespaceAuthorizations()
focal_method.identifier: getAllNamespaceAuthorizations
focal_method.invocations: getNamespaces add setNamespace getNamespaceCode setNamespacePermissions getAllNamespacePermissions
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: Set<NamespaceAuthorization>
focal_method.signature: Set<NamespaceAuthorization> getAllNamespaceAuthorizations()