@Override public void init() { try { mCache.init(); } catch (Exception e) { Billing.error(e); } }
@Override public void init() { if (mCache == null) { return; } synchronized (this) { Billing.debug(TAG, "Initializing cache"); mCache.init(); } }
@Test public void testShouldCallInit() throws Exception { final Cache mockCache = mock(Cache.class); final ConcurrentCache cache = new ConcurrentCache(mockCache); cache.init(); verify(mockCache, times(1)).init(); }