public static <T> CloseableIterator<T> noopCloseable(Iterator<? extends T> iterator) {
    // There is no resource to close
    return new CloseableIterator(iterator) {
      @Override
      public void closeResource() {
        // no-op
      }
    };
  }
@Test
  public void noopCloseable() {
    Iterator<Integer> iterator = Lists.newArrayList(1, 2).iterator();
    CloseableIterator<Integer> closeable = CloseableIterator
        .noopCloseable(Lists.newArrayList(1, 2).iterator());
    Iterators.elementsEqual(iterator, closeable.get());
  }