public void testChooseKeyCooldown() throws CHKEncodeException, IOException, MetadataUnresolvedException, MetadataParseException, FetchException, InterruptedException {
int dataBlocks = 3, checkBlocks = 3;
int COOLDOWN_TIME = 200;
TestSplitfile test = TestSplitfile.constructSingleSegment(dataBlocks*BLOCK_SIZE, checkBlocks, null, false);
StorageCallback cb = test.createStorageCallback();
FetchContext ctx = test.makeFetchContext();
ctx.maxSplitfileBlockRetries = 5;
ctx.setCooldownRetries(3);
ctx.setCooldownTime(COOLDOWN_TIME, true);
SplitFileFetcherStorage storage = test.createStorage(cb, ctx);
// 3 tries for each block.
long now = System.currentTimeMillis();
for(int i=0;i<3;i++) {
boolean[] tried = new boolean[dataBlocks+checkBlocks];