public static <T> CloseableIterator<T> concat(CloseableIterator<T> a, CloseableIterator<T> b) {
    return concat(Lists.newArrayList(a, b));
  }
@Test
  public void concatList() {
    ArrayList<Integer> list1 = Lists.newArrayList(1, 2);
    ArrayList<Integer> list2 = Lists.newArrayList(3, 4, 5);
    ArrayList<Integer> list3 = Lists.newArrayList(0);
    TestIterator iterator1 = new TestIterator(list1);
    TestIterator iterator2 = new TestIterator(list2);
    TestIterator iterator3 = new TestIterator(list3);
    CloseableIterator<Integer> iterator4 = CloseableIterator.concat(
        Lists.newArrayList(iterator1, iterator2, iterator3));
    Iterators.elementsEqual(Iterators.concat(list1.iterator(), list2.iterator(), list3.iterator()),
        iterator4.get());
    iterator4.close();
    Assert.assertTrue(iterator1.isClosed());
    Assert.assertTrue(iterator2.isClosed());
    Assert.assertTrue(iterator3.isClosed());
  }