public static <T> Iterable<T> wrap(final Iterable<T> base) {
        return () -> {
            final Iterator<T> itr = base.iterator();
            return new Iterator<>() {
                @Override
                public boolean hasNext() {
                    return itr.hasNext();
                }

                @Override
                public T next() {
                    return itr.next();
                }

                @Override
                public void remove() {
                    itr.remove();
                }
            };
        };
    }
@Test
    public void wrap() {
        List<Integer> lst = Iterators.sequence(1, 4);
        Iterable<Integer> wrapped = Iterators.wrap(lst);
        assertThat(wrapped, not(instanceOf(List.class)));
        Iterator<Integer> iter = wrapped.iterator();
        assertTrue(iter.hasNext());
        assertEquals(1, (int) iter.next());
        assertTrue(iter.hasNext());
        assertEquals(2, (int) iter.next());
        assertTrue(iter.hasNext());
        assertEquals(3, (int) iter.next());
        assertFalse(iter.hasNext());
    }