class TraditionalHandicapTimeScoringInteractor implements HandicapTimeScoringInteractor {

    @Override
    public void score(ScoredRun scoredRun) {
        BigDecimal rawTimeScored = scoredRun.getRawTimeScored();
        Preconditions.checkNotNull(rawTimeScored, "depends on raw time scored");
        Run run = scoredRun.getRun();
        BigDecimal handicapGroupFactor = run.getRegistration().getHandicapGroup().getFactor();
        BigDecimal competitionGroupFactor = run.getRegistration().getCompetitionGroup().getFactor();
        BigDecimal handicapTimeScored = rawTimeScored.multiply(handicapGroupFactor)
                .multiply(competitionGroupFactor)
                .setScale(3, RoundingMode.HALF_UP);
        scoredRun.setHandicapTimeScored(handicapTimeScored);
    }

}