test_class.declarator: namespaceIamRoleAuthorizationHelper
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private NamespaceIamRoleAuthorizationHelper namespaceIamRoleAuthorizationHelper;
test_class.type: NamespaceIamRoleAuthorizationHelper
test_class.var_name: namespaceIamRoleAuthorizationHelper
test_class.declarator: namespaceIamRoleAuthorizationDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private NamespaceIamRoleAuthorizationDao namespaceIamRoleAuthorizationDao;
test_class.type: NamespaceIamRoleAuthorizationDao
test_class.var_name: namespaceIamRoleAuthorizationDao
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.file: herd-code/herd-service/src/test/java/org/finra/herd/service/helper/NamespaceIamRoleAuthorizationHelperTest.java
test_class.identifier: NamespaceIamRoleAuthorizationHelperTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void checkPermissionsAssertAccessDeniedWhenNamespaceNotAuthorizedToAllRole()
      {
          NamespaceEntity expectedNamespaceEntity = new NamespaceEntity();
          expectedNamespaceEntity.setCode("namespace");
          String iamRoleName1 = "iamRoleName1";
          String iamRoleName2 = "iamRoleName2";
          Collection<String> requestedIamRoleNames = Arrays.asList(iamRoleName1, iamRoleName2);
  
          List<NamespaceIamRoleAuthorizationEntity> namespaceIamRoleAuthorizationEntities = new ArrayList<>();
  
          when(configurationHelper.getBooleanProperty(any())).thenReturn(true);
          when(namespaceIamRoleAuthorizationDao.getNamespaceIamRoleAuthorizations(any())).thenReturn(namespaceIamRoleAuthorizationEntities);
  
          try
          {
              namespaceIamRoleAuthorizationHelper.checkPermissions(expectedNamespaceEntity, requestedIamRoleNames);
              fail();
          }
          catch (AccessDeniedException e)
          {
              assertEquals("The namespace \"namespace\" does not have access to the following IAM roles: [iamRoleName1, iamRoleName2]", e.getMessage());
          }
  
          verify(configurationHelper).getBooleanProperty(ConfigurationValue.NAMESPACE_IAM_ROLE_AUTHORIZATION_ENABLED);
          verify(namespaceIamRoleAuthorizationDao).getNamespaceIamRoleAuthorizations(expectedNamespaceEntity);
          verifyNoMoreInteractions(configurationHelper, namespaceIamRoleAuthorizationDao);
      }
test_case.class_method_signature: NamespaceIamRoleAuthorizationHelperTest.checkPermissionsAssertAccessDeniedWhenNamespaceNotAuthorizedToAllRole()
test_case.full_signature: @Test public void checkPermissionsAssertAccessDeniedWhenNamespaceNotAuthorizedToAllRole()
test_case.identifier: checkPermissionsAssertAccessDeniedWhenNamespaceNotAuthorizedToAllRole
test_case.invocations: setCode asList thenReturn when getBooleanProperty any thenReturn when getNamespaceIamRoleAuthorizations any checkPermissions fail assertEquals getMessage getBooleanProperty verify getNamespaceIamRoleAuthorizations verify verifyNoMoreInteractions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void checkPermissionsAssertAccessDeniedWhenNamespaceNotAuthorizedToAllRole()
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: namespaceIamRoleAuthorizationDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private NamespaceIamRoleAuthorizationDao namespaceIamRoleAuthorizationDao;
focal_class.type: NamespaceIamRoleAuthorizationDao
focal_class.var_name: namespaceIamRoleAuthorizationDao
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/helper/NamespaceIamRoleAuthorizationHelper.java
focal_class.identifier: NamespaceIamRoleAuthorizationHelper
focal_class.class_method_signature: NamespaceIamRoleAuthorizationHelper.checkPermissions(NamespaceEntity namespaceEntity, String... requestedIamRoleNames)
focal_class.full_signature: public void checkPermissions(NamespaceEntity namespaceEntity, String... requestedIamRoleNames)
focal_class.identifier: checkPermissions
focal_class.modifiers: public
focal_class.parameters: (NamespaceEntity namespaceEntity, String... requestedIamRoleNames)
focal_class.return: void
focal_class.signature: void checkPermissions(NamespaceEntity namespaceEntity, String... requestedIamRoleNames)
focal_class.class_method_signature: NamespaceIamRoleAuthorizationHelper.checkPermissions(NamespaceEntity namespaceEntity, Collection<String> requestedIamRoleNames)
focal_class.full_signature: public void checkPermissions(NamespaceEntity namespaceEntity, Collection<String> requestedIamRoleNames)
focal_class.identifier: checkPermissions
focal_class.modifiers: public
focal_class.parameters: (NamespaceEntity namespaceEntity, Collection<String> requestedIamRoleNames)
focal_class.return: void
focal_class.signature: void checkPermissions(NamespaceEntity namespaceEntity, Collection<String> requestedIamRoleNames)
focal_method.body: public void checkPermissions(NamespaceEntity namespaceEntity, String... requestedIamRoleNames)
      {
          checkPermissions(namespaceEntity, Arrays.asList(requestedIamRoleNames));
      }
focal_method.class_method_signature: NamespaceIamRoleAuthorizationHelper.checkPermissions(NamespaceEntity namespaceEntity, String... requestedIamRoleNames)
focal_method.full_signature: public void checkPermissions(NamespaceEntity namespaceEntity, String... requestedIamRoleNames)
focal_method.identifier: checkPermissions
focal_method.invocations: checkPermissions asList
focal_method.modifiers: public
focal_method.parameters: (NamespaceEntity namespaceEntity, String... requestedIamRoleNames)
focal_method.return: void
focal_method.signature: void checkPermissions(NamespaceEntity namespaceEntity, String... requestedIamRoleNames)