### Question:
ConfigurableAgeOffFilter extends Filter implements OptionDescriber { @Override public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { super.init(source, options, env); myEnv = env; String disableOnNonFullMajcStr = options.get(AgeOffConfigParams.DISABLE_ON_NON_FULL_MAJC); disabled = (disableOnNonFullMajcStr != null) && Boolean.parseBoolean(disableOnNonFullMajcStr) && isSystemInitiatedMajC(env); if (disabled) { return; } Preconditions.checkNotNull(options, "Configuration filename and " + "the default ttl must be set for the ConfigurableAgeOffFilter"); long sessionScanStart = options.containsKey(AgeOffConfigParams.SCAN_START_TIMESTAMP) ? Long.parseLong(options .get(AgeOffConfigParams.SCAN_START_TIMESTAMP)) : System.currentTimeMillis(); initialize(options.get(AgeOffConfigParams.TTL), options.get(AgeOffConfigParams.TTL_UNITS), options.get(AgeOffConfigParams.TTL_SHORT_CIRCUIT), sessionScanStart, options.get(AgeOffConfigParams.FILTER_CONFIG)); } ConfigurableAgeOffFilter();  ConfigurableAgeOffFilter(ConfigurableAgeOffFilter other, IteratorEnvironment env); @Override boolean accept(Key k, Value v); @Override SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env); @Override void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env); @Override IteratorOptions describeOptions(); @Override boolean validateOptions(Map<String,String> options); static void clearCache(); static LoadingCache<FileRuleWatcher,Collection<FilterRule>> getCache(); @Override String toString(); static final String UPDATE_INTERVAL_MS_PROP; static final String EXPIRATION_INTERVAL_MS_PROP; }### Answer:
@Test(expected = NullPointerException.class) public void testInitWithNoTtl() throws Exception { ConfigurableAgeOffFilter filter = new ConfigurableAgeOffFilter(); filter.init(source, new HashMap<>(), env); }
@Test(expected = NullPointerException.class) public void testInitWithNoTtlUnits() throws Exception { ConfigurableAgeOffFilter filter = new ConfigurableAgeOffFilter(); HashMap<String,String> options = new HashMap<>(); options.put(AgeOffConfigParams.TTL, "31"); filter.init(source, options, env); }