@Test
public void testScoreGeneWithSinglePassedVariantAutosomalRecessiveHomAlt() {

    List<Allele> alleles = buildAlleles("A", "T");
    //Classical recessive inheritance mode
    Genotype proband = buildUnPhasedSampleGenotype("Cain", alleles.get(1), alleles.get(1));
    assertThat(proband.getType(), equalTo(GenotypeType.HOM_VAR));
    Genotype mother = buildUnPhasedSampleGenotype("Eve", alleles.get(0), alleles.get(1));
    assertThat(mother.getType(), equalTo(GenotypeType.HET));
    Genotype father = buildUnPhasedSampleGenotype("Adam", alleles.get(1), alleles.get(0));
    assertThat(father.getType(), equalTo(GenotypeType.HET));
    VariantContext variantContext = buildVariantContext(1, 12345, alleles, proband, mother, father);
    System.out.println("Built variant context " + variantContext);
    System.out.println("Proband sample 0 has genotype " + variantContext.getGenotype(0).getGenotypeString());
    Individual probandIndividual = Individual.builder().id("Cain").fatherId("Adam").motherId("Eve").sex(Sex.MALE).status(Status.AFFECTED).build();
    Individual motherIndividual = Individual.builder().id("Eve").fatherId("").motherId("").sex(Sex.FEMALE).status(Status.UNAFFECTED).build();
    Individual fatherIndividual = Individual.builder().id("Adam").fatherId("").motherId("").sex(Sex.MALE).status(Status.UNAFFECTED).build();
    Pedigree pedigree = Pedigree.of(probandIndividual, motherIndividual, fatherIndividual);
    VariantEvaluation probandHomAlt = filteredVariant(1, 12345, "A", "T", FilterResult.pass(FilterType.FREQUENCY_FILTER), variantContext, VariantEffect.MISSENSE_VARIANT);
    probandHomAlt.setCompatibleInheritanceModes(EnumSet.of(ModeOfInheritance.AUTOSOMAL_RECESSIVE));
    Gene gene = newGene(probandHomAlt);
    List<GeneScore> geneScores = scoreGene(gene, ModeOfInheritance.AUTOSOMAL_RECESSIVE, SampleIdentifier.of(probandIndividual.getId(), 0), pedigree);
    float variantScore = probandHomAlt.getVariantScore();
    assertThat(probandHomAlt.contributesToGeneScore(), is(true));
    GeneScore expected = GeneScore.builder()
            .geneIdentifier(gene.getGeneIdentifier())
            .modeOfInheritance(ModeOfInheritance.AUTOSOMAL_RECESSIVE)
            .variantScore(variantScore)
            .phenotypeScore(0f)
            .combinedScore(variantScore / 2)
            .contributingVariants(ImmutableList.of(probandHomAlt))
            .build();
    assertThat(geneScores, equalTo(ImmutableList.of(expected)));
}