@Test
public void testScoreGeneWithThreePassedVariantsAutosomalRecessiveInheritance() {

    VariantEvaluation passAllMissense = passAllMissense();
    passAllMissense.setCompatibleInheritanceModes(EnumSet.of(ModeOfInheritance.AUTOSOMAL_DOMINANT, ModeOfInheritance.AUTOSOMAL_RECESSIVE));
    VariantEvaluation passAllSynonymous = passAllSynonymous();
    passAllSynonymous.setCompatibleInheritanceModes(EnumSet.of(ModeOfInheritance.AUTOSOMAL_DOMINANT, ModeOfInheritance.AUTOSOMAL_RECESSIVE));
    VariantEvaluation passAllFrameshift = passAllFrameShift();
    passAllFrameshift.setCompatibleInheritanceModes(EnumSet.of(ModeOfInheritance.AUTOSOMAL_DOMINANT, ModeOfInheritance.AUTOSOMAL_RECESSIVE));
    Gene gene = newGene(passAllMissense, passAllSynonymous, passAllFrameshift);
    List<GeneScore> geneScores = scoreGene(gene, ModeOfInheritance.AUTOSOMAL_RECESSIVE, 0);
    float variantScore = (passAllFrameshift.getVariantScore() + passAllMissense.getVariantScore()) / 2f;
    assertThat(passAllFrameshift.contributesToGeneScore(), is(true));
    assertThat(passAllFrameshift.contributesToGeneScoreUnderMode(ModeOfInheritance.AUTOSOMAL_RECESSIVE), is(true));
    assertThat(passAllMissense.contributesToGeneScore(), is(true));
    assertThat(passAllMissense.contributesToGeneScoreUnderMode(ModeOfInheritance.AUTOSOMAL_RECESSIVE), is(true));
    assertThat(passAllSynonymous.contributesToGeneScore(), is(false));
    assertThat(passAllSynonymous.contributesToGeneScoreUnderMode(ModeOfInheritance.AUTOSOMAL_RECESSIVE), is(false));
    GeneScore expected = GeneScore.builder()
            .geneIdentifier(gene.getGeneIdentifier())
            .modeOfInheritance(ModeOfInheritance.AUTOSOMAL_RECESSIVE)
            .variantScore(variantScore)
            .phenotypeScore(0f)
            .combinedScore(variantScore / 2)
            .contributingVariants(ImmutableList.of(passAllMissense, passAllFrameshift))
            .build();
    assertThat(geneScores, equalTo(ImmutableList.of(expected)));
}