### Question:
PropogatingIterator implements SortedKeyValueIterator<Key,Value>, OptionDescriber { @Override public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { if (null != source) this.iterator = source.deepCopy(env); else this.iterator = null; this.env = env; this.options.putAll(options); validateOptions(options); } private  PropogatingIterator(PropogatingIterator other, IteratorEnvironment env);  PropogatingIterator();  PropogatingIterator(SortedKeyValueIterator<Key,Value> iterator, ColumnToClassMapping<Combiner> Aggregators); PropogatingIterator 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); @Override IteratorOptions describeOptions(); @Override boolean validateOptions(Map<String,String> options); static final String ATTRIBUTE_NAME; static final String ATTRIBUTE_DESCRIPTION; static final String UNNAMED_OPTION_DESCRIPTION; static final String AGGREGATOR_DEFAULT; static final String AGGREGATOR_DEFAULT_OPT; static final Map<String,String> defaultMapOptions; }### Answer:
@Test(expected = NullPointerException.class) public void testNullOptionsWithInit() throws IOException { Map<String,String> options = Maps.newHashMap(); options.put(PropogatingIterator.AGGREGATOR_DEFAULT, GlobalIndexUidAggregator.class.getCanonicalName()); IteratorEnvironment env = new MockIteratorEnvironment(false); new PropogatingIterator().init(createSourceWithTestData(), null, env); }
@Test(expected = NullPointerException.class) public void testNullEnvironmentWithInit() throws IOException { Map<String,String> options = Maps.newHashMap(); options.put(PropogatingIterator.AGGREGATOR_DEFAULT, GlobalIndexUidAggregator.class.getCanonicalName()); new PropogatingIterator().init(createSourceWithTestData(), options, null); }