ProjectAssignmentManagementServiceImpl implements ProjectAssignmentManagementService { @Override public ProjectAssignment persistNewProjectAssignment(ProjectAssignment assignment) { return projectAssignmentDao.persist(assignment); } @Autowired  ProjectAssignmentManagementServiceImpl(UserDao userDAO,
                                                  ProjectDao projectDao,
                                                  ProjectAssignmentDao projectAssignmentDao,
                                                  TimesheetDao timesheetDao); @Transactional @Auditable(actionType = AuditActionType.CREATE) void assignAllUsersToProject(Project project); @Override @Transactional @Auditable(actionType = AuditActionType.CREATE) void assignUsersToProjects(List<User> users, ProjectAssignment assignmentTemplate); @Transactional @Auditable(actionType = AuditActionType.UPDATE) ProjectAssignment persistUpdatedProjectAssignment(ProjectAssignment projectAssignment); @Override ProjectAssignment persistNewProjectAssignment(ProjectAssignment assignment); @Transactional @Auditable(actionType = AuditActionType.UPDATE) User assignUserToDefaultProjects(User user); @Transactional @Auditable(actionType = AuditActionType.DELETE) void deleteProjectAssignment(ProjectAssignment assignment);  }
@Test public void should_assign_user_to_project() throws ProjectAlreadyAssignedException { ProjectAssignment projectAssignment = ProjectAssignmentObjectMother.createProjectAssignment(1); service.persistNewProjectAssignment(projectAssignment); verify(projectAssignmentDao).persist(projectAssignment); }