/* Ċ Ġ* ĠCopyright Ġ( C ) Ġ 2 0 2 1 ĠThe ĠAndroid ĠOpen ĠSource ĠProject Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* ĠĠĠĠĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ package Ġcom . android . tools . idea . app inspection . inspect ors . network . model Ċ Ċ import Ġcom . android . tools . adt ui . model . Range Ċ import Ġcom . google . common . truth . Truth . assertThat Ċ import Ġorg . junit . Test Ċ import Ġstudio . network . inspection . Network Inspector Protocol . Event Ċ import Ġstudio . network . inspection . Network Inspector Protocol . Speed Event Ċ Ċ class ĠNetwork Inspector Data Series Test Ġ{ ĊĠ Ġ@ Test ĊĠ Ġfun ĠgetData For Range () Ġ{ ĊĠĠĠ Ġval Ġevent 1 Ġ= ĠEvent . newBuilder (). set Timestamp ( 1 0 0 0 ) ĊĠĠĠĠĠ Ġ. set Speed Event ( Speed Event . getDefaultInstance ()) ĊĠĠĠĠĠ Ġ. build () ĊĠĠĠ Ġval Ġevent 2 Ġ= ĠEvent . newBuilder (). set Timestamp ( 2 0 0 0 ) ĊĠĠĠĠĠ Ġ. set Speed Event ( Speed Event . getDefaultInstance ()) ĊĠĠĠĠĠ Ġ. build () ĊĠĠĠ Ġval Ġsource Ġ= ĠFake Network Inspector DataSource ( speed Event List Ġ= ĠlistOf ( event 1 , Ġevent 2 )) ĊĊĠĠĠ Ġval Ġfound Events Ġ= Ġmutable ListOf < Event >() ĊĠĠĠ Ġval Ġseries Ġ= ĠNetwork Inspector Data Series ( source ) Ġ{ Ġevent Ġ-> ĊĠĠĠĠĠ Ġfound Events . add ( event ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġseries . getData For Range ( Range ( 1 . 0 , Ġ 2 . 0 )) ĊĊĠĠĠ ĠassertThat ( found Events ). contains Exactly ( event 1 , Ġevent 2 ) ĊĠ Ġ} Ċ }