@Test
public void testWrite() throws Exception {

    write(header, samples, records, writer);
    writer.close();
    assertEquals("##fileformat=VCFv4.1" + System.lineSeparator()
                 + "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tNA19131" + System.lineSeparator()
                 + "22\t16140370\trs2096606\tA\tG\t100\tPASS\t.\tGT\t1|1" + System.lineSeparator(), outputStream.toString());
}