MockCore.startBlock();
// recherche des business value et risk level
BusinessValue businessValueOfTheStory = new BusinessValueImpl();
businessValueOfTheStory.setId(1);
mockBusinessValueRepository.expectFindById(1, businessValueOfTheStory);
RiskLevel riskLevelOfTheStory = new RiskLevelImpl();
riskLevelOfTheStory.setId(2);
mockRiskLevelRepository.expectFindById(2, riskLevelOfTheStory);
MockCore.endBlock();
storyToUpdate.setBusinessValue(businessValueOfTheStory);
storyToUpdate.setRiskLevel(riskLevelOfTheStory);
// validation
mockStoryValidator.expectValidate(new Ignore(), errors);
// enregistrement de la story dans la repository
mockStoryRepository.expectAddOrUpdate(storyToUpdate);
// appel de la m�thode de mise � jour
Errors errorsFromService = storyService.update(shortDescription, description, daysestimated, businessValueOfTheStory.getId(), riskLevelOfTheStory.getId(),persistanceId, persistanceVersion);
// V�rifie les appels
MockCore.verify();
// aucune erreur n'est retourn�e (car pas de validation)