@Test
public void testBlockStream()
{

  BlockStream bs = new BlockStream();
  List<byte[]> totalList = Lists.newArrayList();
  List<Slice> slices = Lists.newArrayList();
  for (int tryTime = 0; tryTime < 10; ++tryTime) {
    List<byte[]> list = generateList();
    totalList.addAll(list);
    writeToBlockStream(bs, list, slices);
    if (tryTime % 2 != 0) {
      verify(totalList, slices);
      bs.reset();
      totalList.clear();
      slices.clear();
    }
  }
}