class TotalScoreSolverRankingComparator implements Comparator<SolverBenchmarkResult> {

    private final Comparator<SolverBenchmarkResult> worstScoreSolverRankingComparator = new WorstScoreSolverRankingComparator();

    @Override
    public int compare(SolverBenchmarkResult a, SolverBenchmarkResult b) {<FILL_FUNCTION_BODY>}

}

        ScoreDefinition aScoreDefinition = a.getScoreDefinition();
        return Comparator
                .comparing(SolverBenchmarkResult::getFailureCount, Comparator.reverseOrder())
                .thenComparing(SolverBenchmarkResult::getTotalScore,
                        new ResilientScoreComparator(aScoreDefinition))
                .thenComparing(worstScoreSolverRankingComparator)
                .compare(a, b);

    
<no_super_class>