@Test
public void testCloseFilePointers() throws IOException {
// Build up query parameters
File file = new File(BaseTest.privateTestDir + "NA12878.hg19.example1.vcf");
RMDTriplet triplet = new RMDTriplet("test", "VCF", file.getAbsolutePath(), RMDTriplet.RMDStorageType.FILE, new Tags());
IndexedFastaSequenceFile seq = new CachingIndexedFastaSequenceFile(new File(BaseTest.hg19Reference));
GenomeLocParser parser = new GenomeLocParser(seq);
GenomeLoc loc = parser.createGenomeLoc("20", 1, 100000);
TestRMDTrackBuilder builder = new TestRMDTrackBuilder(seq.getSequenceDictionary(), parser);
// Create the query data pool
ReferenceOrderedQueryDataPool pool = new ReferenceOrderedQueryDataPool(triplet, builder, seq.getSequenceDictionary(), parser);
for (int i = 0; i < 3; i++) {
// Ensure our tribble iterators are closed.
CheckableCloseableTribbleIterator.clearThreadIterators();
Assert.assertTrue(CheckableCloseableTribbleIterator.getThreadIterators().isEmpty(), "Tribble iterators list was not cleared.");