@Test
public void testFetchThree() {
LinkedHashMap<String, ManagedBuffer> blocks = Maps.newLinkedHashMap();
blocks.put("b0", new NioManagedBuffer(ByteBuffer.wrap(new byte[12])));
blocks.put("b1", new NioManagedBuffer(ByteBuffer.wrap(new byte[23])));
blocks.put("b2", new NettyManagedBuffer(Unpooled.wrappedBuffer(new byte[23])));
BlockFetchingListener listener = fetchBlocks(blocks);
for (int i = 0; i < 3; i ++) {
verify(listener, times(1)).onBlockFetchSuccess("b" + i, blocks.get("b" + i));