@Test
public void testWriteRecordGenotypeFields() throws Exception {

    Map<String, VcfGenotype> genotypes = new HashMap<String, VcfGenotype>();
    VcfGenotype genotype = VcfGenotype.builder().withField("GT", "1|1").withField("DS", "0.000").withField("GL", "-0.02", "-1.38", "-5.00").build();
    genotypes.put("NA19131", genotype);
    VcfRecord genotypeFields = new VcfRecord(3L, "22", 16140370L, new String[] { "rs2096606" }, "A", new String[] { "G" }, Double.NaN, new String[] { "PASS" }, info, new String[] { "GT", "DS", "GL" }, genotypes);
    writeRecord(samples, genotypeFields, writer);
    writer.close();
    assertEquals("22\t16140370\trs2096606\tA\tG\t.\tPASS\t.\tGT:DS:GL\t1|1:0.000:-0.02,-1.38,-5.00" + System.lineSeparator(), outputStream.toString());
}