### Question:
ConcurrentCache implements Cache { @Override public void put(@Nonnull Key key, @Nonnull Entry entry) { if (mCache == null) { return; } synchronized (this) { Billing.debug(TAG, "Adding entry with key=" + key + " to the cache"); mCache.put(key, entry); } } ConcurrentCache(@Nullable Cache cache); boolean hasCache(); @Override @Nullable Entry get(@Nonnull Key key); @Override void put(@Nonnull Key key, @Nonnull Entry entry); void putIfNotExist(@Nonnull Key key, @Nonnull Entry entry); @Override void init(); @Override void remove(@Nonnull Key key); @Override void removeAll(int type); @Override void clear();  }### Answer:
@Test public void testShouldPutAllEntries() throws Exception { final Cache mockCache = mock(Cache.class); final ConcurrentCache cache = new ConcurrentCache(mockCache); final Cache.Entry entry = newEntry(); cache.put(newKey(), entry); cache.put(newKey(), entry); cache.put(newKey(), entry); verify(mockCache, times(3)).put(any(Cache.Key.class), eq(entry)); }