PairedEndFastqReader { public static void readPaired(final Reader firstReader, final Reader secondReader, final PairedEndListener listener) throws IOException { readPaired((Readable) firstReader, (Readable) secondReader, listener); } private  PairedEndFastqReader(); static void readPaired(final Reader firstReader,
                                  final Reader secondReader,
                                  final PairedEndListener listener); static void readPaired(final Readable firstReadable,
                                  final Readable secondReadable,
                                  final PairedEndListener listener); static void streamPaired(final Reader firstReader,
                                    final Reader secondReader,
                                    final PairedEndListener listener); static void streamPaired(final Readable firstReadable,
                                    final Readable secondReadable,
                                    final PairedEndListener listener); static void streamInterleaved(final Reader reader, final PairedEndListener listener); static void streamInterleaved(final Readable readable, final PairedEndListener listener);  }
@Test(expected=NullPointerException.class) public void testReadPairedNullFirstReader() throws Exception { readPaired(null, secondReader, listener); }
@Test(expected=NullPointerException.class) public void testReadPairedNullSecondReader() throws Exception { readPaired(firstReader, null, listener); }
@Test(expected=NullPointerException.class) public void testReadPairedNullListener() throws Exception { readPaired(firstReader, secondReader, null); }
@Test public void testReadPaired() throws Exception { readPaired(firstReader, secondReader, new PairedEndAdapter() { @Override public void paired(final Fastq left, final Fastq right) { assertEquals(PairedEndFastqReaderTest.this.left.getDescription(), left.getDescription()); assertEquals(PairedEndFastqReaderTest.this.right.getDescription(), right.getDescription()); } @Override public void unpaired(final Fastq unpaired) { fail("unpaired " + unpaired); } }); }
@Test public void testReadPairedUnpaired() throws Exception { readPaired(firstReader, firstReader, new PairedEndAdapter() { @Override public void paired(final Fastq left, final Fastq right) { fail("paired " + left + " " + right); } @Override public void unpaired(final Fastq unpaired) { assertEquals(PairedEndFastqReaderTest.this.left.getDescription(), left.getDescription()); } }); }