package Ġcom . nish an th . news app . core . utils Ċ Ċ import Ġkotlinx . coroutines . flow . Flow Ċ import Ġkotlinx . coroutines . flow . take Ċ import Ġkotlinx . coroutines . flow . toList Ċ import Ġorg . junit . Assert . assertEquals Ċ Ċ /** Ċ Ġ* ĠAssert s Ġonly Ġthe Ġ[ expected ] Ġitems Ġby Ġjust Ġtaking Ġthat Ġmany Ġfrom Ġthe Ġstream Ċ Ġ*/ Ċ suspend Ġfun Ġ< T > ĠFlow < T >. assert Items ( var arg Ġexpected : ĠT ) Ġ{ ĊĠĠĠ ĠassertEquals ( expected . toList (), Ġthis . take ( expected . size ). toList ()) Ċ } Ċ Ċ /** Ċ Ġ* ĠTakes Ġall Ġelements Ġfrom Ġthe Ġstream Ġand Ġassert s Ġthem . Ċ Ġ*/ Ċ suspend Ġfun Ġ< T > ĠFlow < T >. assert Complete Stream ( var arg Ġexpected : ĠT ) Ġ{ ĊĠĠĠ ĠassertEquals ( expected . toList (), Ġthis . toList ()) Ċ }