public static <T> RemoteIterator<T> remoteIteratorFromSingleton(
      @Nullable T singleton) {
    return new SingletonIterator<>(singleton);
  }
@Test
  public void testSingleton() throws Throwable {
    StringBuilder result = new StringBuilder();
    String name = "singleton";
    RemoteIterator<String> it = remoteIteratorFromSingleton(name);
    assertStringValueContains(it, "SingletonIterator");
    assertStringValueContains(it, name);
    verifyInvoked(
        it,
        1,
        (s) -> result.append(s));
    assertThat(result.toString())
        .isEqualTo(name);
  }