public static <T> CloseableIterator<T> from(Iterator<T> iterator) {
    // early fail
    requireNonNull(iterator);
    checkArgument(!(iterator instanceof AutoCloseable), "This method does not support creating a CloseableIterator from an Iterator which is Closeable");
    return new RegularIteratorWrapper<>(iterator);
  }
@Test(expected = IllegalArgumentException.class)
  public void from_iterator_throws_IAE_if_arg_is_a_AutoCloseable() {
    CloseableIterator.from(new CloseableIt());
  }