ContextStore implements Iterable<Resource> { void decrementBy(Resource context, long amount) { contextInfoMap.computeIfPresent(context, (c, size) -> size <= amount ? null : size - amount); contentsChanged = true; } ContextStore(NativeSailStore store, File dataDir); @Override Iterator<Resource> iterator();  }
@Test public void testDecrementNonExisting() throws Exception { subject.decrementBy(g1, 1); assertThat(countContexts(subject)).isEqualTo(0); }