@Test
public void testGetGeneScoresForMode() {

    Gene fgfr2Gene = TestFactory.newGeneFGFR2();
    VariantEvaluation top = VariantEvaluation.builder(10, 23456, "G", "T").build();
    GeneScore firstAD = GeneScore.builder()
            .geneIdentifier(fgfr2Gene.getGeneIdentifier())
            .modeOfInheritance(ModeOfInheritance.AUTOSOMAL_DOMINANT)
            .combinedScore(1f)
            .contributingVariants(ImmutableList.of(top))
            .build();
    VariantEvaluation bottom = VariantEvaluation.builder(10, 23456, "A", "T").build();
    GeneScore thirdAR = GeneScore.builder()
            .geneIdentifier(fgfr2Gene.getGeneIdentifier())
            .modeOfInheritance(ModeOfInheritance.AUTOSOMAL_RECESSIVE)
            .combinedScore(0.50f)
            .contributingVariants(ImmutableList.of(bottom))
            .build();
    fgfr2Gene.addGeneScore(firstAD);
    fgfr2Gene.addGeneScore(thirdAR);
    Gene rbm8aGene = TestFactory.newGeneRBM8A();
    VariantEvaluation middle = VariantEvaluation.builder(7, 456889, "C", "A").build();
    GeneScore secondAD = GeneScore.builder()
            .geneIdentifier(rbm8aGene.getGeneIdentifier())
            .modeOfInheritance(ModeOfInheritance.AUTOSOMAL_DOMINANT)
            .combinedScore(0.75f)
            .contributingVariants(ImmutableList.of(middle))
            .build();
    rbm8aGene.addGeneScore(secondAD);
    //no gene score for SHH
    Gene shhGene = TestFactory.newGeneSHH();
    List<Gene> genes = ImmutableList.of(fgfr2Gene, rbm8aGene, shhGene);
    AnalysisResults instance = AnalysisResults.builder()
            .genes(genes)
            .build();
    assertThat(instance.getGeneScoresForMode(ModeOfInheritance.AUTOSOMAL_DOMINANT), equalTo(ImmutableList.of(firstAD, secondAD)));
    assertThat(instance.getGeneScoresForMode(ModeOfInheritance.AUTOSOMAL_RECESSIVE), equalTo(ImmutableList.of(thirdAR)));
}