public void test_23() throws IOException {
		String vcfFileName = "tests/test.chr1.vcf";
		int MAX_TEST = 1000;
		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, count = 0;
		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());
			count++;
		}

		// Add some slack
		int dist = (maxPos - minPos) / count;
		minPos -= 1000;
		maxPos += 1000;

		// Dump random parts of the file
		System.out.println("\tDump test (short): ");
		for (int testNum = 1; testNum < MAX_TEST; testNum++) {
			// Random interval
			int start = random.nextInt(maxPos - minPos) + minPos;
			int end = start + random.nextInt(10) * dist; // Distance between a few lines 

			// 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);

			Gpr.showMark(testNum, 1);
		}

		idx.close();
	}