public static <T> PrefetchableIterator<T> fromArray(T... values) {
    if (values.length == 0) {
      return emptyIterator();
    }
    return new PrefetchableIterator<T>() {
      int currentIndex;

      @Override
      public boolean isReady() {
        return true;
      }

      @Override
      public void prefetch() {}

      @Override
      public boolean hasNext() {
        return currentIndex < values.length;
      }

      @Override
      public T next() {
        if (!hasNext()) {
          throw new NoSuchElementException();
        }
        return values[currentIndex++];
      }
    };
  }
@Test
  public void testFromArray() {
    verifyIterator(PrefetchableIterators.fromArray("A", "B", "C"), "A", "B", "C");
    verifyIsAlwaysReady(PrefetchableIterators.fromArray("A", "B", "C"));
    verifyIterator(PrefetchableIterators.fromArray());
    verifyIsAlwaysReady(PrefetchableIterators.fromArray());
  }