@Test
public void testWriteContributingVariantsOnlyContainsOnlyContributingVariantLine() {

    shhIndelVariant.addFilterResult(FAIL_TARGET_RESULT);
    shhIndelVariant.setCompatibleInheritanceModes(EnumSet.of(ModeOfInheritance.AUTOSOMAL_DOMINANT));
    fgfr2PassMissenseVariant.addFilterResult(PASS_TARGET_RESULT);
    fgfr2PassMissenseVariant.setCompatibleInheritanceModes(EnumSet.of(ModeOfInheritance.AUTOSOMAL_DOMINANT));
    fgfr2ContributingVariant.addFilterResult(PASS_TARGET_RESULT);
    fgfr2ContributingVariant.setCompatibleInheritanceModes(EnumSet.of(ModeOfInheritance.AUTOSOMAL_DOMINANT));
    fgfr2ContributingVariant.setContributesToGeneScoreUnderMode(ModeOfInheritance.AUTOSOMAL_DOMINANT);
    GeneScore geneScore = GeneScore.builder()
            .modeOfInheritance(ModeOfInheritance.AUTOSOMAL_DOMINANT)
            .geneIdentifier(fgfr2Gene.getGeneIdentifier())
            .contributingVariants(ImmutableList.of(fgfr2ContributingVariant))
            .build();
    fgfr2Gene.addGeneScore(geneScore);
    fgfr2Gene.setCompatibleInheritanceModes(EnumSet.of(ModeOfInheritance.AUTOSOMAL_DOMINANT));
    AnalysisResults analysisResults = buildAnalysisResults(fgfr2Gene, shhGene);
    OutputSettings outputContributingVariantsOnly = OutputSettings.builder()
            .outputFormats(EnumSet.of(OutputFormat.VCF))
            .outputContributingVariantsOnly(true)
            .build();
    
    String output = instance.writeString(ModeOfInheritance.AUTOSOMAL_DOMINANT, analysis, analysisResults, outputContributingVariantsOnly);
    String expected = EXPECTED_HEADER + CHR10_FGFR2_CONTRIBUTING_VARIANT;
    assertThat(output, equalTo(expected));
}