test_class.declarator: USER_ID = "user"
test_class.modifier: private final
test_class.original_string: private final String USER_ID = "user";
test_class.type: String
test_class.var_name: USER_ID
test_class.declarator: userRepoMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private UserRepository userRepoMock;
test_class.type: UserRepository
test_class.var_name: userRepoMock
test_class.declarator: userDataRepoMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private UserDataRepository userDataRepoMock;
test_class.type: UserDataRepository
test_class.var_name: userDataRepoMock
test_class.declarator: ldapAdapterMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private LdapAdapter ldapAdapterMock;
test_class.type: LdapAdapter
test_class.var_name: ldapAdapterMock
test_class.declarator: hierarchyTreeNodeRepoMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private HierarchyTreeNodeRepository hierarchyTreeNodeRepoMock;
test_class.type: HierarchyTreeNodeRepository
test_class.var_name: hierarchyTreeNodeRepoMock
test_class.declarator: userMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private User userMock;
test_class.type: User
test_class.var_name: userMock
test_class.declarator: otherUserMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private User otherUserMock;
test_class.type: User
test_class.var_name: otherUserMock
test_class.declarator: hierarchyTreeNodeMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private HierarchyTreeNode hierarchyTreeNodeMock;
test_class.type: HierarchyTreeNode
test_class.var_name: hierarchyTreeNodeMock
test_class.declarator: otherHierarchyTreeNodeMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private HierarchyTreeNode otherHierarchyTreeNodeMock;
test_class.type: HierarchyTreeNode
test_class.var_name: otherHierarchyTreeNodeMock
test_class.declarator: userDataMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private UserData userDataMock;
test_class.type: UserData
test_class.var_name: userDataMock
test_class.declarator: hibernateSearchServiceMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private HibernateSearchService hibernateSearchServiceMock;
test_class.type: HibernateSearchService
test_class.var_name: hibernateSearchServiceMock
test_class.declarator: repoUserService
test_class.modifier: private
test_class.original_string: private RepositoryUserService repoUserService;
test_class.type: RepositoryUserService
test_class.var_name: repoUserService
test_class.file: backend/project-board/src/test/java/de/adesso/projectboard/ad/user/RepositoryUserServiceTest.java
test_class.identifier: RepositoryUserServiceTest
test_case.body: @Test
      public void getHierarchyForUserReturnsHierarchyWhenPresent() {
          // given
          given(hierarchyTreeNodeRepoMock.findByUser(userMock)).willReturn(Optional.of(hierarchyTreeNodeMock));
  
          // when
          var actualHierarchy = repoUserService.getHierarchyForUser(userMock);
  
          // then
          assertThat(actualHierarchy).isEqualTo(hierarchyTreeNodeMock);
      }
test_case.class_method_signature: RepositoryUserServiceTest.getHierarchyForUserReturnsHierarchyWhenPresent()
test_case.full_signature: @Test public void getHierarchyForUserReturnsHierarchyWhenPresent()
test_case.identifier: getHierarchyForUserReturnsHierarchyWhenPresent
test_case.invocations: willReturn given findByUser of getHierarchyForUser isEqualTo assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getHierarchyForUserReturnsHierarchyWhenPresent()
focal_class.declarator: userRepo
focal_class.modifier: private final
focal_class.original_string: private final UserRepository userRepo;
focal_class.type: UserRepository
focal_class.var_name: userRepo
focal_class.declarator: dataRepo
focal_class.modifier: private final
focal_class.original_string: private final UserDataRepository dataRepo;
focal_class.type: UserDataRepository
focal_class.var_name: dataRepo
focal_class.declarator: ldapAdapter
focal_class.modifier: private final
focal_class.original_string: private final LdapAdapter ldapAdapter;
focal_class.type: LdapAdapter
focal_class.var_name: ldapAdapter
focal_class.declarator: hierarchyTreeNodeRepo
focal_class.modifier: private final
focal_class.original_string: private final HierarchyTreeNodeRepository hierarchyTreeNodeRepo;
focal_class.type: HierarchyTreeNodeRepository
focal_class.var_name: hierarchyTreeNodeRepo
focal_class.declarator: hibernateSearchService
focal_class.modifier: private final
focal_class.original_string: private final HibernateSearchService hibernateSearchService;
focal_class.type: HibernateSearchService
focal_class.var_name: hibernateSearchService
focal_class.file: backend/project-board/src/main/java/de/adesso/projectboard/ad/user/RepositoryUserService.java
focal_class.identifier: RepositoryUserService
focal_class.interfaces: implements UserService
focal_class.class_method_signature: RepositoryUserService.RepositoryUserService(UserRepository userRepo,
                                   UserDataRepository dataRepo,
                                   LdapAdapter ldapAdapter,
                                   HierarchyTreeNodeRepository hierarchyTreeNodeRepo,
                                   HibernateSearchService hibernateSearchService)
focal_class.full_signature: public  RepositoryUserService(UserRepository userRepo,
                                   UserDataRepository dataRepo,
                                   LdapAdapter ldapAdapter,
                                   HierarchyTreeNodeRepository hierarchyTreeNodeRepo,
                                   HibernateSearchService hibernateSearchService)
focal_class.identifier: RepositoryUserService
focal_class.modifiers: public
focal_class.parameters: (UserRepository userRepo,
                                   UserDataRepository dataRepo,
                                   LdapAdapter ldapAdapter,
                                   HierarchyTreeNodeRepository hierarchyTreeNodeRepo,
                                   HibernateSearchService hibernateSearchService)
focal_class.signature:  RepositoryUserService(UserRepository userRepo,
                                   UserDataRepository dataRepo,
                                   LdapAdapter ldapAdapter,
                                   HierarchyTreeNodeRepository hierarchyTreeNodeRepo,
                                   HibernateSearchService hibernateSearchService)
focal_class.class_method_signature: RepositoryUserService.userExists(@NonNull String userId)
focal_class.full_signature: @Override public boolean userExists(@NonNull String userId)
focal_class.identifier: userExists
focal_class.modifiers: @Override public
focal_class.parameters: (@NonNull String userId)
focal_class.return: boolean
focal_class.signature: boolean userExists(@NonNull String userId)
focal_class.class_method_signature: RepositoryUserService.userIsManager(@NonNull User user)
focal_class.full_signature: @Override public boolean userIsManager(@NonNull User user)
focal_class.identifier: userIsManager
focal_class.modifiers: @Override public
focal_class.parameters: (@NonNull User user)
focal_class.return: boolean
focal_class.signature: boolean userIsManager(@NonNull User user)
focal_class.class_method_signature: RepositoryUserService.getHierarchyForUser(@NonNull User user)
focal_class.full_signature: @Override public HierarchyTreeNode getHierarchyForUser(@NonNull User user)
focal_class.identifier: getHierarchyForUser
focal_class.modifiers: @Override public
focal_class.parameters: (@NonNull User user)
focal_class.return: HierarchyTreeNode
focal_class.signature: HierarchyTreeNode getHierarchyForUser(@NonNull User user)
focal_class.class_method_signature: RepositoryUserService.getUserData(@NonNull User user)
focal_class.full_signature: @Override public UserData getUserData(@NonNull User user)
focal_class.identifier: getUserData
focal_class.modifiers: @Override public
focal_class.parameters: (@NonNull User user)
focal_class.return: UserData
focal_class.signature: UserData getUserData(@NonNull User user)
focal_class.class_method_signature: RepositoryUserService.getUserById(@NonNull String userId)
focal_class.full_signature: @Override public User getUserById(@NonNull String userId)
focal_class.identifier: getUserById
focal_class.modifiers: @Override public
focal_class.parameters: (@NonNull String userId)
focal_class.return: User
focal_class.signature: User getUserById(@NonNull String userId)
focal_class.class_method_signature: RepositoryUserService.userHasStaffMember(@NonNull User user, @NonNull User staffMember)
focal_class.full_signature: @Override public boolean userHasStaffMember(@NonNull User user, @NonNull User staffMember)
focal_class.identifier: userHasStaffMember
focal_class.modifiers: @Override public
focal_class.parameters: (@NonNull User user, @NonNull User staffMember)
focal_class.return: boolean
focal_class.signature: boolean userHasStaffMember(@NonNull User user, @NonNull User staffMember)
focal_class.class_method_signature: RepositoryUserService.getManagerOfUser(@NonNull User user)
focal_class.full_signature: @Override public User getManagerOfUser(@NonNull User user)
focal_class.identifier: getManagerOfUser
focal_class.modifiers: @Override public
focal_class.parameters: (@NonNull User user)
focal_class.return: User
focal_class.signature: User getManagerOfUser(@NonNull User user)
focal_class.class_method_signature: RepositoryUserService.getStaffMemberUserDataOfUser(@NonNull User user, @NonNull Sort sort)
focal_class.full_signature: @Override public List<UserData> getStaffMemberUserDataOfUser(@NonNull User user, @NonNull Sort sort)
focal_class.identifier: getStaffMemberUserDataOfUser
focal_class.modifiers: @Override public
focal_class.parameters: (@NonNull User user, @NonNull Sort sort)
focal_class.return: List<UserData>
focal_class.signature: List<UserData> getStaffMemberUserDataOfUser(@NonNull User user, @NonNull Sort sort)
focal_class.class_method_signature: RepositoryUserService.searchStaffMemberDataOfUser(User user, String query, Sort sort)
focal_class.full_signature: @Override public List<UserData> searchStaffMemberDataOfUser(User user, String query, Sort sort)
focal_class.identifier: searchStaffMemberDataOfUser
focal_class.modifiers: @Override public
focal_class.parameters: (User user, String query, Sort sort)
focal_class.return: List<UserData>
focal_class.signature: List<UserData> searchStaffMemberDataOfUser(User user, String query, Sort sort)
focal_class.class_method_signature: RepositoryUserService.getStaffMembersOfUser(@NonNull User user)
focal_class.full_signature: @Override public List<User> getStaffMembersOfUser(@NonNull User user)
focal_class.identifier: getStaffMembersOfUser
focal_class.modifiers: @Override public
focal_class.parameters: (@NonNull User user)
focal_class.return: List<User>
focal_class.signature: List<User> getStaffMembersOfUser(@NonNull User user)
focal_class.class_method_signature: RepositoryUserService.save(@NonNull User user)
focal_class.full_signature: @Override public User save(@NonNull User user)
focal_class.identifier: save
focal_class.modifiers: @Override public
focal_class.parameters: (@NonNull User user)
focal_class.return: User
focal_class.signature: User save(@NonNull User user)
focal_class.class_method_signature: RepositoryUserService.delete(User user)
focal_class.full_signature: @Override public void delete(User user)
focal_class.identifier: delete
focal_class.modifiers: @Override public
focal_class.parameters: (User user)
focal_class.return: void
focal_class.signature: void delete(User user)
focal_class.class_method_signature: RepositoryUserService.deleteUserById(String userId)
focal_class.full_signature: @Override public void deleteUserById(String userId)
focal_class.identifier: deleteUserById
focal_class.modifiers: @Override public
focal_class.parameters: (String userId)
focal_class.return: void
focal_class.signature: void deleteUserById(String userId)
focal_class.class_method_signature: RepositoryUserService.usersAreManagers(@NonNull Set<User> users)
focal_class.full_signature: @Override public Map<User, Boolean> usersAreManagers(@NonNull Set<User> users)
focal_class.identifier: usersAreManagers
focal_class.modifiers: @Override public
focal_class.parameters: (@NonNull Set<User> users)
focal_class.return: Map<User, Boolean>
focal_class.signature: Map<User, Boolean> usersAreManagers(@NonNull Set<User> users)
focal_class.class_method_signature: RepositoryUserService.getOrCreateUserById(@NonNull String userId)
focal_class.full_signature: public User getOrCreateUserById(@NonNull String userId)
focal_class.identifier: getOrCreateUserById
focal_class.modifiers: public
focal_class.parameters: (@NonNull String userId)
focal_class.return: User
focal_class.signature: User getOrCreateUserById(@NonNull String userId)
focal_class.class_method_signature: RepositoryUserService.initializeThumbnailPhotos(@NonNull List<UserData> userData)
focal_class.full_signature:  List<UserData> initializeThumbnailPhotos(@NonNull List<UserData> userData)
focal_class.identifier: initializeThumbnailPhotos
focal_class.parameters: (@NonNull List<UserData> userData)
focal_class.return: List<UserData>
focal_class.signature: List<UserData> initializeThumbnailPhotos(@NonNull List<UserData> userData)
focal_class.class_method_signature: RepositoryUserService.copyAndSetThumbnailPhoto(@NonNull UserData userData, byte[] thumbnailPhoto)
focal_class.full_signature:  UserData copyAndSetThumbnailPhoto(@NonNull UserData userData, byte[] thumbnailPhoto)
focal_class.identifier: copyAndSetThumbnailPhoto
focal_class.parameters: (@NonNull UserData userData, byte[] thumbnailPhoto)
focal_class.return: UserData
focal_class.signature: UserData copyAndSetThumbnailPhoto(@NonNull UserData userData, byte[] thumbnailPhoto)
focal_class.class_method_signature: RepositoryUserService.removeAllApplicationsOfUser(User user)
focal_class.full_signature: @Override public void removeAllApplicationsOfUser(User user)
focal_class.identifier: removeAllApplicationsOfUser
focal_class.modifiers: @Override public
focal_class.parameters: (User user)
focal_class.return: void
focal_class.signature: void removeAllApplicationsOfUser(User user)
focal_method.body: @Override
      public HierarchyTreeNode getHierarchyForUser(@NonNull User user) {
          return hierarchyTreeNodeRepo.findByUser(user)
                  .orElseThrow(() -> new HierarchyNotFoundException(user.getId()));
      }
focal_method.class_method_signature: RepositoryUserService.getHierarchyForUser(@NonNull User user)
focal_method.full_signature: @Override public HierarchyTreeNode getHierarchyForUser(@NonNull User user)
focal_method.identifier: getHierarchyForUser
focal_method.invocations: orElseThrow findByUser getId
focal_method.modifiers: @Override public
focal_method.parameters: (@NonNull User user)
focal_method.return: HierarchyTreeNode
focal_method.signature: HierarchyTreeNode getHierarchyForUser(@NonNull User user)