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: userRepository
test_class.modifier: @Mock
test_class.original_string: @Mock
      UserRepository userRepository;
test_class.type: UserRepository
test_class.var_name: userRepository
test_class.declarator: projectMock
test_class.modifier: @Mock
test_class.original_string: @Mock
      Project projectMock;
test_class.type: Project
test_class.var_name: projectMock
test_class.declarator: userMock
test_class.modifier: @Mock
test_class.original_string: @Mock
      User userMock;
test_class.type: User
test_class.var_name: userMock
test_class.declarator: bookmarkService
test_class.original_string: RepositoryBookmarkService bookmarkService;
test_class.type: RepositoryBookmarkService
test_class.var_name: bookmarkService
test_class.file: backend/project-board/src/test/java/de/adesso/projectboard/ad/user/RepositoryBookmarkServiceTest.java
test_class.identifier: RepositoryBookmarkServiceTest
test_case.body: @Test
      public void addBookmarkToUserAddsBookmark() {
          // given
  
          // when
          Project actualProject = bookmarkService.addBookmarkToUser(userMock, projectMock);
  
          // then
          assertThat(actualProject).isEqualTo(projectMock);
  
          verify(userMock).addBookmark(projectMock);
          verify(userRepository).save(userMock);
      }
test_case.class_method_signature: RepositoryBookmarkServiceTest.addBookmarkToUserAddsBookmark()
test_case.full_signature: @Test public void addBookmarkToUserAddsBookmark()
test_case.identifier: addBookmarkToUserAddsBookmark
test_case.invocations: addBookmarkToUser isEqualTo assertThat addBookmark verify save verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void addBookmarkToUserAddsBookmark()
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.file: backend/project-board/src/main/java/de/adesso/projectboard/ad/user/RepositoryBookmarkService.java
focal_class.identifier: RepositoryBookmarkService
focal_class.interfaces: implements BookmarkService
focal_class.class_method_signature: RepositoryBookmarkService.RepositoryBookmarkService(UserRepository userRepo)
focal_class.full_signature: @Autowired public  RepositoryBookmarkService(UserRepository userRepo)
focal_class.identifier: RepositoryBookmarkService
focal_class.modifiers: @Autowired public
focal_class.parameters: (UserRepository userRepo)
focal_class.signature:  RepositoryBookmarkService(UserRepository userRepo)
focal_class.class_method_signature: RepositoryBookmarkService.addBookmarkToUser(User user, Project project)
focal_class.full_signature: @Override public Project addBookmarkToUser(User user, Project project)
focal_class.identifier: addBookmarkToUser
focal_class.modifiers: @Override public
focal_class.parameters: (User user, Project project)
focal_class.return: Project
focal_class.signature: Project addBookmarkToUser(User user, Project project)
focal_class.class_method_signature: RepositoryBookmarkService.removeBookmarkOfUser(User user, Project project)
focal_class.full_signature: @Override public void removeBookmarkOfUser(User user, Project project)
focal_class.identifier: removeBookmarkOfUser
focal_class.modifiers: @Override public
focal_class.parameters: (User user, Project project)
focal_class.return: void
focal_class.signature: void removeBookmarkOfUser(User user, Project project)
focal_class.class_method_signature: RepositoryBookmarkService.getBookmarksOfUser(User user)
focal_class.full_signature: @Override @Transactional(readOnly = true) public List<Project> getBookmarksOfUser(User user)
focal_class.identifier: getBookmarksOfUser
focal_class.modifiers: @Override @Transactional(readOnly = true) public
focal_class.parameters: (User user)
focal_class.return: List<Project>
focal_class.signature: List<Project> getBookmarksOfUser(User user)
focal_class.class_method_signature: RepositoryBookmarkService.userHasBookmark(User user, Project project)
focal_class.full_signature: @Override @Transactional(readOnly = true) public boolean userHasBookmark(User user, Project project)
focal_class.identifier: userHasBookmark
focal_class.modifiers: @Override @Transactional(readOnly = true) public
focal_class.parameters: (User user, Project project)
focal_class.return: boolean
focal_class.signature: boolean userHasBookmark(User user, Project project)
focal_class.class_method_signature: RepositoryBookmarkService.removeAllBookmarksOfUser(User user)
focal_class.full_signature: @Override public void removeAllBookmarksOfUser(User user)
focal_class.identifier: removeAllBookmarksOfUser
focal_class.modifiers: @Override public
focal_class.parameters: (User user)
focal_class.return: void
focal_class.signature: void removeAllBookmarksOfUser(User user)
focal_method.body: @Override
      public Project addBookmarkToUser(User user, Project project) {
          // add the project and persist the entity
          user.addBookmark(project);
          userRepo.save(user);
  
          return project;
      }
focal_method.class_method_signature: RepositoryBookmarkService.addBookmarkToUser(User user, Project project)
focal_method.full_signature: @Override public Project addBookmarkToUser(User user, Project project)
focal_method.identifier: addBookmarkToUser
focal_method.invocations: addBookmark save
focal_method.modifiers: @Override public
focal_method.parameters: (User user, Project project)
focal_method.return: Project
focal_method.signature: Project addBookmarkToUser(User user, Project project)