### Question:
ScannerSession extends AbstractExecutionThreadService implements Iterator<Entry<Key,Value>> { public void setResourceClass(Class<? extends AccumuloResource> clazz) { delegatedResourceInitializer = clazz; } ScannerSession(String tableName, Set<Authorizations> auths, ResourceQueue delegator, int maxResults, Query settings);  ScannerSession(String tableName, Set<Authorizations> auths, ResourceQueue delegator, int maxResults, Query settings, SessionOptions options,
                    Collection<Range> ranges); ScannerSession setRanges(Collection<Range> ranges); ScannerSession setRanges(Iterable<Range> ranges); @Override boolean equals(Object obj); @Override int hashCode(); @Override boolean hasNext(); @Override Entry<Key,Value> next(); Range buildNextRange(final Key lastKey, final Range previousRange); void setResourceClass(Class<? extends AccumuloResource> clazz); @Override void remove(); ScannerSession setOptions(SessionOptions options); SessionOptions getOptions(); ScanSessionStats getStatistics(); void setDelegatedInitializer(Class<? extends AccumuloResource> delegatedResourceInitializer); ScannerSession applyStats(ScanSessionStats stats); void close(); void setFairness(boolean fairness); void setMaxResults(int maxResults);  }### Answer:
@Test public void testScannerSessionWithBatchResourceLowMaxResults() throws TableNotFoundException { Set<Authorizations> auths = new HashSet<>(); auths.add(new Authorizations()); ScannerSession ss = new ScannerSession("testTable", auths, resourceQueue, 5, null); ss.setResourceClass(BatchResource.class); validate(ss); }
@Test public void testScannerSessionWithBatchResourceHighMaxResults() throws TableNotFoundException { Set<Authorizations> auths = new HashSet<>(); auths.add(new Authorizations()); ScannerSession ss = new ScannerSession("testTable", auths, resourceQueue, 5000000, null); ss.setResourceClass(BatchResource.class); validate(ss); }
@Test(expected = RuntimeException.class) public void testScannerSessionWithRuntimeExceptionResource() throws TableNotFoundException { Set<Authorizations> auths = new HashSet<>(); auths.add(new Authorizations()); ScannerSession ss = new ScannerSession("testTable", auths, resourceQueue, 5000000, null); ss.setResourceClass(StubbedRuntimeExceptionResource.class); validate(ss); }