public static <T> RemoteIterator<T> remoteIteratorFromIterator(
      Iterator<T> iterator) {
    return new WrappedJavaIterator<>(iterator);
  }
@Test
  public void testJavaIteratorSupport() throws Throwable {
    CountdownIterator countdownIterator = new CountdownIterator(100);
    RemoteIterator<Integer> it = remoteIteratorFromIterator(
        countdownIterator);
    verifyInvoked(it, 100, c -> counter++);
    assertStringValueContains(it, "CountdownIterator");
    extractStatistics(it);
    close(it);
    countdownIterator.assertCloseCount(1);
  }