### Question:
GenGenotypeWriter implements GenotypeWriter { @Override public void write(String basePath) throws IOException { if (!genotypeData.isOnlyContaingSaveProbabilityGenotypes()) { LOGGER.warn("WARNING!!! writing dosage genotype data to .gen posterior probabilities file. Using heuristic method to convert to probabilities, this is not guaranteed to be accurate. See manual for more details."); } write(new File(basePath + ".gen"), new File(basePath + ".sample")); } GenGenotypeWriter(GenotypeData genotypeData); @Override void write(String basePath); void write(File genFile, File sampleFile); static final Charset FILE_ENCODING; static final char LINE_ENDING; }### Answer:
@Test public void write() throws IOException, URISyntaxException { writer.write(tmpOutputFolder.getAbsolutePath() + fileSep + "test"); GenotypeData genotypeDataWritten = RandomAccessGenotypeDataReaderFormats.GEN.createGenotypeData(tmpOutputFolder.getAbsolutePath() + fileSep + "test", 0); assertTrue(GenotypeDataCompareTool.same(genotypeData, genotypeDataWritten)); }