AsahSegmentsEntryCache { public void putSegmentsEntryIds(String userId, long[] segmentsEntryIds) { _portalCache.put( _generateCacheKey(userId), segmentsEntryIds, _anonymousTimeToLiveInSeconds); }  long[] getSegmentsEntryIds(String userId); void putSegmentsEntryIds(String userId, long[] segmentsEntryIds);  }
@Test public void testPutSegmentsEntryIds() { String userId = RandomTestUtil.randomString(); long[] segmentsEntryIds = { RandomTestUtil.randomLong(), RandomTestUtil.randomLong() }; String cacheKey = _generateCacheKey(userId); _asahSegmentsEntryCache.putSegmentsEntryIds(userId, segmentsEntryIds); Mockito.verify( _portalCache, Mockito.times(1) ).put( cacheKey, segmentsEntryIds, 0 ); }