Iteration iteration = new IterationImpl();
iteration.setDays(100);
iteration.setStories(new HashSet<Story>());
// mock de story
MockStory mockStory1 = new MockStory();
MockStory mockStory2 = new MockStory();
MockStory mockStory3 = new MockStory();
mockStory1.setDaysCompletedDummy(40);
mockStory1.setDaysRemainingDummy(10);
iteration.getStories().add(mockStory1);
mockStory2.setDaysCompletedDummy(10);
mockStory2.setDaysRemainingDummy(10);
iteration.getStories().add(mockStory2);
mockStory3.setDaysCompletedDummy(5);
mockStory3.setDaysRemainingDummy(5);
iteration.getStories().add(mockStory3);
assertEquals(-20.0, iteration.differenceInPercentBetweenIterationAndStories());
}