public void test_24() throws IOException {
		int MAX_TEST = 100;
		String vcfFileName = "tests/test.chr1.vcf";
		Random random = new Random(20130217);

		// Index file
		System.out.println("Indexing file '" + vcfFileName + "'");
		FileIndexChrPos idx = new FileIndexChrPos(vcfFileName);
		idx.setVerbose(verbose);
		idx.setDebug(debug);
		idx.open();
		idx.index();

		// Read VCF file
		int minPos = Integer.MAX_VALUE, maxPos = Integer.MIN_VALUE;
		ArrayList<VcfEntry> vcfEntries = new ArrayList<VcfEntry>();
		VcfFileIterator vcf = new VcfFileIterator(vcfFileName);
		for (VcfEntry ve : vcf) {
			vcfEntries.add(ve);
			minPos = Math.min(minPos, ve.getStart());
			maxPos = Math.max(maxPos, ve.getStart());
		}

		// Add some slack
		minPos -= 1000;
		maxPos += 1000;

		// Dump random parts of the file
		for (int testNum = 0; testNum < MAX_TEST;) {
			// Random interval
			int start = random.nextInt(maxPos - minPos) + minPos;
			int end = random.nextInt(maxPos - minPos) + minPos;

			if (end > start) {
				System.out.println("Dump test (long) " + testNum + "/" + MAX_TEST + "\tchr1:" + start + "\tchr1:" + end);
				// Dump file
				String dump = idx.dump("1", start, end, true);

				// Calculate expected result
				StringBuilder expected = new StringBuilder();
				for (VcfEntry ve : vcfEntries) {
					if ((start <= ve.getStart()) && (ve.getStart() <= end)) {
						// Append to expected output
						if (expected.length() > 0) expected.append("\n");
						expected.append(ve.getLine());
					}
				}
				if (expected.length() > 0) expected.append("\n");

				// Does it match?
				Assert.assertEquals(expected.toString(), dump);

				testNum++;
			}
		}

		idx.close();
	}