public void testWithBAMFile() {
// create a fake BAM file, and iterate through it
final ArtificialBAMBuilder bamBuilder = new ArtificialBAMBuilder(seq, 20, 10);
final File bam = bamBuilder.makeTemporarilyBAMFile();
final SAMFileReader reader = new SAMFileReader(bam);
reader.setSAMRecordFactory(new GATKSamRecordFactory());
final Iterator<SAMRecord> bamIt = reader.iterator();
while ( bamIt.hasNext() ) {
final GATKSAMRecord read = (GATKSAMRecord)bamIt.next(); // all reads are actually GATKSAMRecords
// TODO -- add some tests that use reads from a BAM