@Test
public void testWriteProducesFileWithCorrectName() throws Exception {

    Path tempFolder = Files.createTempDirectory("exomiser_test");
    String outPrefix = tempFolder.resolve("testWrite").toString();
    OutputSettings settings = settingsBuilder.outputPrefix(outPrefix).build();
    instance.writeFile(ModeOfInheritance.AUTOSOMAL_RECESSIVE, analysis, analysisResults, settings);
    Path arOutputPath = tempFolder.resolve("testWrite_AR.variants.tsv");
    assertThat(arOutputPath.toFile().exists(), is(true));
    assertThat(arOutputPath.toFile().delete(), is(true));
    instance.writeFile(ModeOfInheritance.AUTOSOMAL_DOMINANT, analysis, analysisResults, settings);
    Path adOutputPath = tempFolder.resolve("testWrite_AD.variants.tsv");
    assertThat(adOutputPath.toFile().exists(), is(true));
    assertThat(adOutputPath.toFile().delete(), is(true));
    Files.delete(tempFolder);
}