### Question:
Intersection implements IndexStream { @Override public boolean hasNext() { return next != null; } Intersection(Iterable<? extends IndexStream> children, UidIntersector uidIntersector); @Override boolean hasNext(); @Override Tuple2<String,IndexInfo> next(); @Override Tuple2<String,IndexInfo> peek(); @Override void remove(); static Builder builder(); @Override StreamContext context(); @Override String getContextDebug(); @Override String toString(); @Override JexlNode currentNode();  }### Answer:
@Test public void testIntersection_DifferentShardStreams() { List<IndexMatch> leftMatches = buildIndexMatches("FIELD", "VALUE", "doc1", "doc2", "doc3"); IndexInfo left = new IndexInfo(leftMatches); left.setNode(JexlNodeFactory.buildEQNode("FIELD", "VALUE")); Tuple2<String,IndexInfo> leftTuple = Tuples.tuple("20190314_0", left); PeekingIterator<Tuple2<String,IndexInfo>> leftIter = Iterators.peekingIterator(Collections.singleton(leftTuple).iterator()); List<IndexMatch> rightMatches = buildIndexMatches("FIELD", "VALUE", "doc2", "doc3", "doc4"); IndexInfo right = new IndexInfo(rightMatches); right.setNode(JexlNodeFactory.buildEQNode("FIELD", "VALUE")); Tuple2<String,IndexInfo> rightTuple = Tuples.tuple("20190314_1", right); PeekingIterator<Tuple2<String,IndexInfo>> rightIter = Iterators.peekingIterator(Collections.singleton(rightTuple).iterator()); IndexStream leftStream = ScannerStream.withData(leftIter, JexlNodeFactory.buildEQNode("FIELD", "VALUE")); IndexStream rightStream = ScannerStream.withData(rightIter, JexlNodeFactory.buildEQNode("FIELD", "VALUE")); List<IndexStream> indexStreams = Lists.newArrayList(leftStream, rightStream); Intersection intersection = new Intersection(indexStreams, new IndexInfo()); assertFalse(intersection.hasNext()); }