@Test public void projectExistsReturnsTrueForExistingProjectForId() { when(projectRepo.existsById(PROJECT_ID)).thenReturn(true); boolean actualExists = projectService.projectExists(PROJECT_ID); assertThat(actualExists).isTrue(); }
@Override @Transactional(readOnly = true) public boolean projectExists(String projectId) { return projectRepo.existsById(projectId); }
RepositoryProjectService implements ProjectService { @Override @Transactional(readOnly = true) public boolean projectExists(String projectId) { return projectRepo.existsById(projectId); } }
RepositoryProjectService implements ProjectService { @Override @Transactional(readOnly = true) public boolean projectExists(String projectId) { return projectRepo.existsById(projectId); } @Autowired  RepositoryProjectService(ProjectRepository projectRepo,
                                    ProjectApplicationRepository applicationRepo,
                                    UserRepository userRepo,
                                    UserService userService,
                                    Clock clock); }
RepositoryProjectService implements ProjectService { @Override @Transactional(readOnly = true) public boolean projectExists(String projectId) { return projectRepo.existsById(projectId); } @Autowired  RepositoryProjectService(ProjectRepository projectRepo,
                                    ProjectApplicationRepository applicationRepo,
                                    UserRepository userRepo,
                                    UserService userService,
                                    Clock clock); @Override @Transactional(readOnly = true) Project getProjectById(String projectId); @Override @Transactional(readOnly = true) boolean projectExists(String projectId); @Override Project save(Project project); @Override List<Project> saveAll(List<Project> projects); @Override Project createProject(Project project); }
RepositoryProjectService implements ProjectService { @Override @Transactional(readOnly = true) public boolean projectExists(String projectId) { return projectRepo.existsById(projectId); } @Autowired  RepositoryProjectService(ProjectRepository projectRepo,
                                    ProjectApplicationRepository applicationRepo,
                                    UserRepository userRepo,
                                    UserService userService,
                                    Clock clock); @Override @Transactional(readOnly = true) Project getProjectById(String projectId); @Override @Transactional(readOnly = true) boolean projectExists(String projectId); @Override Project save(Project project); @Override List<Project> saveAll(List<Project> projects); @Override Project createProject(Project project);  }