AsahInterestTermCache { public void putInterestTerms(String userId, String[] terms) { _portalCache.put( _generateCacheKey(userId), terms, _interestTermsTimeToLiveInSeconds); }  String[] getInterestTerms(String userId); void putInterestTerms(String userId, String[] terms);  }
@Test public void testPutInterestTerms() { String userId = RandomTestUtil.randomString(); String[] interestTerms = { RandomTestUtil.randomString(), RandomTestUtil.randomString() }; String cacheKey = _generateCacheKey(userId); _asahInterestTermCache.putInterestTerms(userId, interestTerms); Mockito.verify( _portalCache, Mockito.times(1) ).put( cacheKey, interestTerms, 0 ); }