assertEquals(expectedChunkIndex.getAndIncrement(), myChunkIndex);
ChunkReceivedCallback callback = (ChunkReceivedCallback) invocation.getArguments()[2];
ManagedBuffer result = blockIterator.next();
if (result != null) {
callback.onSuccess(myChunkIndex, result);
} else {
callback.onFailure(myChunkIndex, new RuntimeException("Failed " + myChunkIndex));
}
} catch (Exception e) {
e.printStackTrace();