package Ġcom . very good security . vg sc heck out . api Ċ Ċ import Ġandroid . app . Activity Ċ import Ġcom . very good security . vg sc heck out . Test Application Ċ import Ġcom . very good security . vg sc heck out . collect . core . V GS Collect Ċ import Ġorg . junit . Assert . assertNotNull Ċ import Ġorg . junit . Assert . assertTrue Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . ro bo lectric . Ro bo lectric Ċ import Ġorg . ro bo lectric . Ro bo lectric TestRunner Ċ import Ġorg . ro bo lectric . annotation . Config Ċ Ċ @ RunWith ( Ro bo lectric TestRunner :: class ) Ċ @ Config ( application Ġ= ĠTest Application :: class ) Ċ class ĠSystem Headers Test Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġactivity : ĠActivity ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġcollect : ĠV GS Collect ĊĊĠĠĠ Ġ@ Before ĊĠĠĠ Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġactivity Controller Ġ= ĠRo bo lectric . build Activity ( Activity :: class . java ) ĊĠĠĠĠĠĠĠ Ġactivity Ġ= Ġactivity Controller . get () ĊĠĠĠĠĠĠĠ Ġcollect Ġ= ĠV GS Collect ( activity , Ġ" t nt s ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd _ headers _ during _ init () Ġ{ ĊĠĠĠĠĠĠĠ Ġcollect . update Agent Header () ĊĠĠĠĠĠĠĠ Ġval Ġheaders : String ? Ġ= Ġcollect . getClient (). get Storage (). get Custom Headers ()[ AGENT ] ĊĊĠĠĠĠĠĠĠ ĠassertNotNull ( headers ) ĊĠĠĠĠĠĠĠ ĠassertTrue ( headers !!. contains ( SOURCE _ ANDROID )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( headers . contains ( MEDIUM _ CHECK OUT )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( headers . contains ( CONTENT )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( headers . contains ( OS )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( headers . contains ( ID )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( headers . contains ( TR )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĊĠĠĠĠĠĠĠ Ġprivate Ġconst Ġval ĠAG ENT Ġ= Ġ" V GS - Client " ĊĠĠĠĠĠĠĠ Ġprivate Ġconst Ġval ĠSOURCE _ ANDROID Ġ= Ġ" source = checkout - android " ĊĠĠĠĠĠĠĠ Ġprivate Ġconst Ġval ĠMED IUM _ CHECK OUT Ġ= Ġ" vgs - checkout " ĊĠĠĠĠĠĠĠ Ġprivate Ġconst Ġval ĠCONTENT Ġ= Ġ" content " ĊĠĠĠĠĠĠĠ Ġprivate Ġconst Ġval ĠOS Ġ= Ġ" os Version " ĊĠĠĠĠĠĠĠ Ġprivate Ġconst Ġval ĠID Ġ= Ġ" vgs Checkout SessionId " ĊĠĠĠĠĠĠĠ Ġprivate Ġconst Ġval ĠTR Ġ= Ġ" tr " ĊĠĠĠ Ġ} Ċ }