*/
public void testRefreshableTimeToLive() throws Exception
{
String testString = new String( "This is a test");
Object retrievedObject = null;
RefreshableCachedObject cacheObject = null;
GlobalCacheService globalCache = (GlobalCacheService)TurbineServices
.getInstance()
.getService( GlobalCacheService.SERVICE_NAME );
// Create and add Object that expires in TEST_EXPIRETIME millis.
cacheObject = new RefreshableCachedObject(new RefreshableObject(), TEST_EXPIRETIME);
assertNotNull( "Failed to create a cachable object", cacheObject);
cacheObject.setTTL(TEST_TIMETOLIVE);
// Verify TimeToLive was set
assertEquals( "Returned TimeToLive", TEST_TIMETOLIVE, cacheObject.getTTL());
// Add object to Cache
long addTime = System.currentTimeMillis();
globalCache.addObject(cacheKey, cacheObject);