### Question:
RangeStreamScanner extends ScannerSession implements Callable<RangeStreamScanner> { protected String getDay(final Key key) { String myDay = null; byte[] cq = key.getColumnQualifierData().getBackingArray(); if (cq.length >= dateCfLength) { myDay = new String(cq, 0, dateCfLength); if (log.isTraceEnabled()) { log.trace("Day is " + myDay + " for " + key); } } return myDay; } RangeStreamScanner(String tableName, Set<Authorizations> auths, ResourceQueue delegator, int maxResults, Query settings);  RangeStreamScanner(String tableName, Set<Authorizations> auths, ResourceQueue delegator, int maxResults, Query settings, SessionOptions options,
                    Collection<Range> ranges);  RangeStreamScanner(ScannerSession other); void setExecutor(ExecutorService service); RangeStreamScanner setScannerFactory(ScannerFactory factory); @Override Range buildNextRange(final Key lastKey, final Range previousRange); @Override boolean hasNext(); RangeStreamScanner setShardsPerDayThreshold(int shardsPerDayThreshold); @Override RangeStreamScanner call();  }### Answer:
@Test public void testGetDay() throws Exception { ScannerFactory scanners = new ScannerFactory(connector, 1); RangeStreamScanner rangeStreamScanner = scanners.newRangeScanner(config.getIndexTableName(), config.getAuthorizations(), config.getQuery(), config.getShardsPerDayThreshold()); Key key = new Key("row".getBytes(), "cf".getBytes(), "20190314".getBytes()); String expectedDay = "20190314"; assertEquals(expectedDay, rangeStreamScanner.getDay(key)); key = new Key("row".getBytes(), "cf".getBytes()); assertNull(rangeStreamScanner.getDay(key)); }