package Ġtest Ċ Ċ import Ġcom . ap ol log raph ql . apollo 3 . cache . Cache Headers Ċ import Ġcom . ap ol log raph ql . apollo 3 . cache . normalized . Memory Cache Ċ import Ġcom . ap ol log raph ql . apollo 3 . cache . normalized . Record Ċ import Ġcom . ap ol log raph ql . apollo 3 . testing . run With Main Loop Ċ import Ġkotlinx . coroutines . delay Ċ import Ġkotlin . test . Test Ċ import Ġkotlin . test . assertEquals Ċ import Ġkotlin . test . assertNull Ċ Ċ class ĠMemory Cache Test Ġ{ ĊĠ Ġ@ Test ĊĠ Ġfun Ġtest DoesNot Expire Before Millis () Ġ= Ġrun With Main Loop Ġ{ ĊĠĠĠ Ġval Ġrecord Ġ= Ġ ĠRecord ( ĊĠĠĠĠĠĠĠ Ġkey Ġ= Ġ" key ", ĊĠĠĠĠĠĠĠ Ġfields Ġ= Ġmap Of ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" field " Ġto Ġ" value " ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġmemory Cache Ġ= ĠMemory Cache ( expire After Millis Ġ= Ġ 2 0 0 ) ĊĠĠĠ Ġmemory Cache . merge ( record , ĠCache Headers . NONE ) ĊĊĠĠĠ Ġval Ġcache Record Ġ= ĠcheckNotNull ( memory Cache . load Record ( record . key , ĠCache Headers . NONE )) ĊĠĠĠ ĠassertEquals ( record . key , Ġcache Record . key ) ĊĠĠĠ ĠassertEquals ( record . fields , Ġcache Record . fields ) ĊĊĠĠĠ Ġdelay ( 2 5 0 ) ĊĠĠĠ ĠassertNull ( memory Cache . load Record ( record . key , ĠCache Headers . NONE )) ĊĠ Ġ} Ċ }