public void testCacheServiceWithImportedObject()
{
SimpleObject obj1 = new SimpleObject( "2", "Object Two" );
SimpleObject obj2 = new SimpleObject( "3", "Object Three" );
CacheService cacheService = getOsgiService( CacheService.class );
cacheService.scheduleDisposalEvery( Every.seconds( 1 ) );
cacheService.dump();
Pointer p1 = cacheService.put( "2", obj1 );
Pointer p2 = cacheService.put( "3", obj2 );
Object result1 = cacheService.retrieve( "2" );
Object result2 = cacheService.retrieve( "3" );
cacheService.dump();
Monitor.dump( "cache" );
assertEquals( obj1, result1 );
assertEquals( obj2, result2 );
}