public void testIndexWritingAndFinding() throws IOException, InterruptedException {
prepareEnvironment(false);
verifyBoth(cache0,cache1);
IndexOutput indexOutput = dirA.createOutput(filename, IOContext.DEFAULT);
indexOutput.writeString("no need to write, nobody ever will read this");
indexOutput.flush();
indexOutput.close();
assertFileExistsHavingRLCount(filename, 1, true);
IndexInput firstOpenOnB = dirB.openInput(filename, IOContext.DEFAULT);
assertFileExistsHavingRLCount(filename, 2, true);