### Question:
Iterators { public static <T> UnaryFunction<? super Iterable<? extends T>, Iterator<? extends T>> fromIterableToIterator() { return new UnaryFunction<Iterable<? extends T>, Iterator<? extends T>>() { public Iterator<? extends T> call(Iterable<? extends T> iterable) { return iterable.iterator(); } }; } private  Iterators(); static Iterator<T> emptyIterator(); static Iterable<T> asIterable(Iterator<T> iterator); static List<T> asList(Iterator<? extends T> iterator); static Set<T> asSet(Iterator<? extends T> iterator); static Multiset<T> asMultiset(Iterator<? extends T> iterator); static UnaryFunction<? super Iterable<? extends T>, Iterator<? extends T>> fromIterableToIterator(); static UnaryFunction<? super Iterable<? extends T>, Iterator<? extends T>> fromIterableToIterator(Class<T> ofKlass); static UnaryFunction<Iterable<? extends T>, Iterator<? extends T>> fromIterableToIteratorKeepingNull(); static UnaryFunction<Iterable<? extends T>, Iterator<? extends T>> fromIterableToIteratorKeepingNull(Class<T> ofKlass);  }### Answer:
@Test public void shouldReturnAFunctionFromIterableToIterator() { Iterable<String> iterable = iterableWith("1", "2", "3"); Iterator<? extends String> firstIterator = fromIterableToIterator(String.class).call(iterable); Iterator<? extends String> secondIterator = fromIterableToIterator(String.class).call(iterable); assertThat(firstIterator.next(), is("1")); assertThat(secondIterator.next(), is("1")); assertThat(secondIterator.next(), is("2")); assertThat(firstIterator.next(), is("2")); assertThat(firstIterator.next(), is("3")); assertThat(secondIterator.next(), is("3")); }