VcfWriter { public static void writeRecords(final List<VcfSample> samples, final List<VcfRecord> records, final PrintWriter writer) { checkNotNull(samples); checkNotNull(records); checkNotNull(writer); for (VcfRecord record : records) { writeRecord(samples, record, writer); } } private  VcfWriter(); static void write(final VcfHeader header,
                             final List<VcfSample> samples,
                             final List<VcfRecord> records,
                             final PrintWriter writer); static void writeHeader(final VcfHeader header, final PrintWriter writer); static void writeColumnHeader(final List<VcfSample> samples, final PrintWriter writer); static void writeRecords(final List<VcfSample> samples,
                                    final List<VcfRecord> records,
                                    final PrintWriter writer); static void writeRecord(final List<VcfSample> samples, final VcfRecord record, final PrintWriter writer);  }
@Test(expected=NullPointerException.class) public void testWriteRecordsNullSamples() throws Exception { writeRecords(null, records, writer); }
@Test(expected=NullPointerException.class) public void testWriteRecordsNullRecords() throws Exception { writeRecords(samples, null, writer); }
@Test(expected=NullPointerException.class) public void testWriteRecordsNullWriter() throws Exception { writeRecords(samples, records, null); }
@Test public void testWriteRecords() throws Exception { writeRecords(samples, records, writer); writer.close(); assertEquals("22\t16140370\trs2096606\tA\tG\t100\tPASS\t.\tGT\t1|1" + System.lineSeparator(), outputStream.toString()); }