*/
Calendar calendar = Calendar.getInstance();
calendar.roll(Calendar.DAY_OF_MONTH, -1); // sprint finished
Sprint sprint = new Sprint();
sprint.setFinalDate(calendar.getTime());
sprint.setSprintStatus(SprintStatus.RUNNING);
sprint.setStories(new HashSet<Story>());
sprint.getStories().add(new Story("STORY 1", null, StoryStatus.DONE, null,10));
sprint.getStories().add(new Story("STORY 2", null, StoryStatus.DONE, null,10));
sprint.getStories().add(new Story("STORY 3", null, StoryStatus.DONE, null,10)); // <<---
sprint.getStories().add(new Story("STORY 3", null, StoryStatus.DONE, null,10));
sprint.getStories().add(new Story("STORY 4", null, StoryStatus.DONE, null,10));// <<---
when(sprintDao.findSprintByStatus(SprintStatus.RUNNING)).thenReturn(sprint);
when(sprintDao.update(sprint)).thenReturn(sprint);
scheduleSprint.execute();
verify(sprintDao).findSprintByStatus(SprintStatus.RUNNING);
verify(sprintDao).update(sprint);
assertEquals(SprintStatus.SUCCESS, sprint.getSprintStatus());
assertEquals(new Long(50), sprint.getDonePoints());
}