assert null != cache.get(new ChunkCacheKey(INDEXNAME, "MyNewFile.txt", 0, BUFFER_SIZE));
// test contents by reading:
byte[] buf = new byte[9];
IndexInput ii = dir.openInput("MyNewFile.txt", IOContext.DEFAULT);
ii.readBytes(buf, 0, (int) ii.length());
ii.close();
assert new String(new byte[] { 66, 69 }).equals(new String(buf).trim());
String testText = "This is some rubbish again that will span more than one chunk - one hopes. Who knows, maybe even three or four chunks.";