ProjectService { public Project saveProject(final Project project) { try { return projectRepo.save(project); } catch (final DataAccessException e) { logger.error(e); throw e; } }  boolean pathContainsCompileableForGame(final String path, final GameData game); List<Project> getAllProjects(); Project saveProject(final Project project); void build(final Iterable<Project> projects, final boolean useCmdLineSettings); void deleteProject(final Project project); List<Project> getProjectsOfPath(final String path); @Transactional RuleSet fetchBestCompressionRuleSet(final Project project); void createTemplateProjectFiles(final Project project);  }
@Test public void testSaveProject() { final Project project = new Project("name", "path", Game.SC2); project.setId(1); when(projectRepoMock.save(project)).thenReturn(project); final Project savedProject = projectService.saveProject(project); assertEquals(project, savedProject, "saving altered project"); }