### Question:
SortedMapIterator implements SortedKeyValueIterator<Key,Value> { @Override public SortedMapIterator deepCopy(IteratorEnvironment env) { if (env != null && env.isSamplingEnabled()) { throw new SampleNotPresentException(); } return new SortedMapIterator(map); } SortedMapIterator(SortedMap<Key,Value> map); @Override SortedMapIterator deepCopy(IteratorEnvironment env); @Override Key getTopKey(); @Override Value getTopValue(); @Override boolean hasTop(); @Override void next(); @Override void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive); @Override void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options,
      IteratorEnvironment env);  }### Answer:
@Test(expected = SampleNotPresentException.class) public void testSampleNotPresent() { SortedMapIterator smi = new SortedMapIterator(new TreeMap<>()); smi.deepCopy(new IteratorEnvironment() { @Override public boolean isSamplingEnabled() { return true; } @Override public SamplerConfiguration getSamplerConfiguration() { return new SamplerConfiguration(RowSampler.class.getName()); } }); }