### Question:
TimedCounter extends ExpiringMap<K, Integer> { @Override public Integer get(K key) { Integer value = super.get(key); return value == null ? 0 : value; } TimedCounter(long duration, TimeUnit unit); @Override Integer get(K key); void increment(K key); void decrement(K key); int total();  }### Answer:
@Test public void shouldReturnZeroForAnyKey() { TimedCounter<Double> counter = new TimedCounter<>(1, TimeUnit.DAYS); assertThat(counter.get(2.0), equalTo(0)); assertThat(counter.get(-3.14159), equalTo(0)); }