### Question:
TupleToRange implements Function<Tuple2<String,IndexInfo>,Iterator<QueryPlan>> { public static Iterator<QueryPlan> createDayRange(JexlNode queryNode, String shard, IndexInfo indexInfo) { JexlNode myNode = queryNode; if (indexInfo.getNode() != null) { myNode = indexInfo.getNode(); } Range range = RangeFactory.createDayRange(shard); if (log.isTraceEnabled()) log.trace("Building day" + range + " from " + (null == myNode ? "NoQueryNode" : JexlStringBuildingVisitor.buildQuery(myNode))); return Collections.singleton(new QueryPlan(myNode, range)).iterator(); } TupleToRange(JexlNode currentNode, ShardQueryConfiguration config); Iterator<QueryPlan> apply(Tuple2<String,IndexInfo> tuple); static boolean isDocumentRange(IndexInfo indexInfo); static boolean isShardRange(String shard); static Iterator<QueryPlan> createDocumentRanges(JexlNode queryNode, String shard, IndexInfo indexMatches, boolean isTldQuery); static Iterator<QueryPlan> createShardRange(JexlNode queryNode, String shard, IndexInfo indexInfo); static Iterator<QueryPlan> createDayRange(JexlNode queryNode, String shard, IndexInfo indexInfo);  }### Answer:
@Test public void testGenerateDayRange() { String shard = "20190314"; IndexInfo indexInfo = new IndexInfo(-1); indexInfo.applyNode(queryNode); List<Range> expectedRanges = new ArrayList<>(1); expectedRanges.add(makeDayRange(shard)); Iterator<QueryPlan> ranges = TupleToRange.createDayRange(queryNode, shard, indexInfo); eval(expectedRanges, ranges); }