public static Cache.Entry makeRandomCacheEntry(byte[] data,boolean isExpired,boolean needsRefresh){
  Random random=new Random();
  Cache.Entry entry=new Cache.Entry();
  if (data != null) {
    entry.data=data;
  }
 else {
    entry.data=new byte[random.nextInt(1024)];
  }
  entry.etag=String.valueOf(random.nextLong());
  entry.serverDate=random.nextLong();
  entry.ttl=isExpired ? 0 : Long.MAX_VALUE;
  entry.softTtl=needsRefresh ? 0 : Long.MAX_VALUE;
  return entry;
}

public static Cache . Entry makeRandomCacheEntry ( byte [ ] data , boolean isExpired , boolean needsRefresh ) { Random random = new Random ( ) ; Cache . Entry entry = new Cache . Entry ( ) ; if ( data != null ) { entry . data = data ; } else { entry . data = new byte [ random . nextInt ( 1024 ) ] ; } entry . etag = String . valueOf ( random . nextLong ( ) ) ; entry . serverDate = random . nextLong ( ) ; entry . ttl = isExpired ? 0 : Long . MAX_VALUE ; entry . softTtl = needsRefresh ? 0 : Long . MAX_VALUE ; return entry ; }
makes a random cache entry .
