public static <T> RemoteIterator<T> remoteIteratorFromSingleton(
      @Nullable T singleton) {
    return new SingletonIterator<>(singleton);
  }
@Test
  public void testSingletonNotClosed() throws Throwable {
    CloseCounter closeCounter = new CloseCounter();
    RemoteIterator<CloseCounter> it = remoteIteratorFromSingleton(closeCounter);
    verifyInvoked(it, 1, this::log);
    close(it);
    closeCounter.assertCloseCount(0);
  }