InterleaveFastq implements Callable<Integer> { public InterleaveFastq(final File firstFastqFile, final File secondFastqFile, final File pairedFile, final File unpairedFile) { checkNotNull(firstFastqFile); checkNotNull(secondFastqFile); checkNotNull(pairedFile); checkNotNull(unpairedFile); this.firstFastqFile = firstFastqFile; this.secondFastqFile = secondFastqFile; this.pairedFile = pairedFile; this.unpairedFile = unpairedFile; } InterleaveFastq(final File firstFastqFile, final File secondFastqFile, final File pairedFile, final File unpairedFile); @Override Integer call(); static void main(final String[] args);  }
@Test public void testInterleaveFastq() throws Exception { copyResource("paired_R1.fq.gz", firstFastqFile); copyResource("paired_R2.fq.gz", secondFastqFile); new InterleaveFastq(firstFastqFile, secondFastqFile, pairedFile, unpairedFile).call(); assertEquals(8, countFastq(pairedFile)); assertEquals(0, countFastq(unpairedFile)); }