fun randomVideo(): Video? { val id: String = UUID.randomUUID().toString() val title = "Video-$id" val url = http://coursera.org/some/video-$id val duration = (60 * Math.rint(Math.random() * 60).toInt() * 1000).toLong() return Video(title, url, duration) }
Construct and return a Video object with a rnadom name , url , and duration .