### Question:
CompositeIterator extends AbstractIterator2<T> implements Iterator<T> { @SafeVarargs public CompositeIterator(Iterator<T>... iterators) { this(Arrays.asList(iterators)); } @SafeVarargs  CompositeIterator(Iterator<T>... iterators);  CompositeIterator(Collection<? extends Iterator<T>> iterators); static CompositeIterator<T> fromIterable(Collection<? extends Iterable<T>> iterables);  }### Answer:
@Test public void testCompositeIterator() { List<Integer> list1 = Arrays.asList(1, 2); List<Integer> list2 = Arrays.asList(3, 4); CompositeIterator<Integer> iterator = new CompositeIterator<Integer>(list1.iterator(), list2.iterator()); assertTrue(iterator.hasNext()); assertEquals((Integer)1, iterator.next()); assertTrue(iterator.hasNext()); assertEquals((Integer)2, iterator.next()); assertTrue(iterator.hasNext()); assertEquals((Integer)3, iterator.next()); assertTrue(iterator.hasNext()); assertEquals((Integer)4, iterator.next()); assertFalse(iterator.hasNext()); try { iterator.next(); fail(); } catch (NoSuchElementException e) { } }