PairedEndFastqReader { static String prefix(final Fastq fastq) { checkNotNull(fastq); Matcher m = PREFIX.matcher(fastq.getDescription()); if (!m.matches()) { throw new PairedEndFastqReaderException("could not parse prefix from description " + fastq.getDescription()); } return m.group(1); } 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 testPrefixNull() { prefix(null); }
@Test public void testPrefixSpace() { assertEquals("prefix", prefix(left)); assertEquals("prefix", prefix(right)); }
@Test public void testPrefixBackslash() { assertEquals("prefix", prefix(Fastq.builder().withDescription("prefix\\1").withSequence("aaaaatttttcccccggggg").withQuality("44444222224444422222").build())); assertEquals("prefix", prefix(Fastq.builder().withDescription("prefix\\2").withSequence("aaaaatttttcccccggggg").withQuality("44444222224444422222").build())); }
@Test(expected=PairedEndFastqReaderException.class) public void testPrefixInvalidPrefix() { prefix(invalidPrefix); }