test_class.declarator: trustedApplicationUserBuilder
test_class.modifier: @Autowired
test_class.original_string: @Autowired
      TrustedApplicationUserBuilder trustedApplicationUserBuilder;
test_class.type: TrustedApplicationUserBuilder
test_class.var_name: trustedApplicationUserBuilder
test_class.file: herd-code/herd-app/src/test/java/org/finra/herd/app/security/TrustedApplicationUserBuilderTest.java
test_class.identifier: TrustedApplicationUserBuilderTest
test_class.superclass: extends AbstractAppTest
test_case.body: @Test
      public void testTrustedUserBuilderNoRoles() throws Exception
      {
          // Create a set of test namespace authorizations.
          Set<NamespaceAuthorization> namespaceAuthorizations = new LinkedHashSet<>();
          namespaceAuthorizations.add(new NamespaceAuthorization(NAMESPACE, SUPPORTED_NAMESPACE_PERMISSIONS));
          namespaceAuthorizations.add(new NamespaceAuthorization(NAMESPACE_2, SUPPORTED_NAMESPACE_PERMISSIONS));
  
          // Create and persist the relative database entities.
          userNamespaceAuthorizationDaoTestHelper
              .createUserNamespaceAuthorizationEntity(TrustedApplicationUserBuilder.TRUSTED_USER_ID, namespaceDaoTestHelper.createNamespaceEntity(NAMESPACE),
                  SUPPORTED_NAMESPACE_PERMISSIONS);
          userNamespaceAuthorizationDaoTestHelper
              .createUserNamespaceAuthorizationEntity(TrustedApplicationUserBuilder.TRUSTED_USER_ID, namespaceDaoTestHelper.createNamespaceEntity(NAMESPACE_2),
                  SUPPORTED_NAMESPACE_PERMISSIONS);
  
          // Build the trusted user.
          ApplicationUser applicationUser = trustedApplicationUserBuilder.buildNoRoles(new MockHttpServletRequest());
  
          // Validate the trusted user.
          assertEquals(TrustedApplicationUserBuilder.TRUSTED_USER_ID, applicationUser.getUserId());
          assertEquals(TrustedApplicationUserBuilder.TRUSTED_USER_FIRST_NAME, applicationUser.getFirstName());
          assertEquals(TrustedApplicationUserBuilder.TRUSTED_USER_LAST_NAME, applicationUser.getLastName());
          assertEquals(TrustedApplicationUserBuilder.TRUSTED_USER_EMAIL, applicationUser.getEmail());
          assertEquals(namespaceAuthorizations, applicationUser.getNamespaceAuthorizations());
          assertEquals(0, applicationUser.getRoles().size());
      }
test_case.class_method_signature: TrustedApplicationUserBuilderTest.testTrustedUserBuilderNoRoles()
test_case.full_signature: @Test public void testTrustedUserBuilderNoRoles()
test_case.identifier: testTrustedUserBuilderNoRoles
test_case.invocations: add add createUserNamespaceAuthorizationEntity createNamespaceEntity createUserNamespaceAuthorizationEntity createNamespaceEntity buildNoRoles assertEquals getUserId assertEquals getFirstName assertEquals getLastName assertEquals getEmail assertEquals getNamespaceAuthorizations assertEquals size getRoles
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testTrustedUserBuilderNoRoles()
focal_class.declarator: userNamespaceAuthorizationHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private UserNamespaceAuthorizationHelper userNamespaceAuthorizationHelper;
focal_class.type: UserNamespaceAuthorizationHelper
focal_class.var_name: userNamespaceAuthorizationHelper
focal_class.declarator: TRUSTED_USER_ID = "TRUSTED_USER"
focal_class.modifier: public static final
focal_class.original_string: public static final String TRUSTED_USER_ID = "TRUSTED_USER";
focal_class.type: String
focal_class.var_name: TRUSTED_USER_ID
focal_class.declarator: TRUSTED_USER_FIRST_NAME = "TRUSTED_USER_FIRST_NAME"
focal_class.modifier: public static final
focal_class.original_string: public static final String TRUSTED_USER_FIRST_NAME = "TRUSTED_USER_FIRST_NAME";
focal_class.type: String
focal_class.var_name: TRUSTED_USER_FIRST_NAME
focal_class.declarator: TRUSTED_USER_LAST_NAME = "TRUSTED_USER_LAST_NAME"
focal_class.modifier: public static final
focal_class.original_string: public static final String TRUSTED_USER_LAST_NAME = "TRUSTED_USER_LAST_NAME";
focal_class.type: String
focal_class.var_name: TRUSTED_USER_LAST_NAME
focal_class.declarator: TRUSTED_USER_EMAIL = "TRUSTED_USER_EMAIL"
focal_class.modifier: public static final
focal_class.original_string: public static final String TRUSTED_USER_EMAIL = "TRUSTED_USER_EMAIL";
focal_class.type: String
focal_class.var_name: TRUSTED_USER_EMAIL
focal_class.declarator: TRUSTED_USER_ROLE = "TRUSTED_USER_ROLE"
focal_class.modifier: public static final
focal_class.original_string: public static final String TRUSTED_USER_ROLE = "TRUSTED_USER_ROLE";
focal_class.type: String
focal_class.var_name: TRUSTED_USER_ROLE
focal_class.file: herd-code/herd-app/src/main/java/org/finra/herd/app/security/TrustedApplicationUserBuilder.java
focal_class.identifier: TrustedApplicationUserBuilder
focal_class.interfaces: implements ApplicationUserBuilder
focal_class.class_method_signature: TrustedApplicationUserBuilder.build(HttpServletRequest request)
focal_class.full_signature: @Override public ApplicationUser build(HttpServletRequest request)
focal_class.identifier: build
focal_class.modifiers: @Override public
focal_class.parameters: (HttpServletRequest request)
focal_class.return: ApplicationUser
focal_class.signature: ApplicationUser build(HttpServletRequest request)
focal_class.class_method_signature: TrustedApplicationUserBuilder.buildNoRoles(HttpServletRequest request)
focal_class.full_signature: @Override public ApplicationUser buildNoRoles(HttpServletRequest request)
focal_class.identifier: buildNoRoles
focal_class.modifiers: @Override public
focal_class.parameters: (HttpServletRequest request)
focal_class.return: ApplicationUser
focal_class.signature: ApplicationUser buildNoRoles(HttpServletRequest request)
focal_class.class_method_signature: TrustedApplicationUserBuilder.buildUser(HttpServletRequest request, boolean includeRoles)
focal_class.full_signature: protected ApplicationUser buildUser(HttpServletRequest request, boolean includeRoles)
focal_class.identifier: buildUser
focal_class.modifiers: protected
focal_class.parameters: (HttpServletRequest request, boolean includeRoles)
focal_class.return: ApplicationUser
focal_class.signature: ApplicationUser buildUser(HttpServletRequest request, boolean includeRoles)
focal_method.body: @Override
      public ApplicationUser buildNoRoles(HttpServletRequest request)
      {
          return buildUser(request, false);
      }
focal_method.class_method_signature: TrustedApplicationUserBuilder.buildNoRoles(HttpServletRequest request)
focal_method.full_signature: @Override public ApplicationUser buildNoRoles(HttpServletRequest request)
focal_method.identifier: buildNoRoles
focal_method.invocations: buildUser
focal_method.modifiers: @Override public
focal_method.parameters: (HttpServletRequest request)
focal_method.return: ApplicationUser
focal_method.signature: ApplicationUser buildNoRoles(HttpServletRequest request)