/* Ċ Ġ* ĠUnless Ġexplicitly Ġstated Ġotherwise Ġall Ġfiles Ġin Ġthis Ġrepository Ġare Ġlicensed Ġunder Ġthe ĠApache ĠLicense ĠVersion Ġ 2 . 0 . Ċ Ġ* ĠThis Ġproduct Ġincludes Ġsoftware Ġdeveloped Ġat ĠDat adog Ġ( https :// www . datadog hq . com /). Ċ Ġ* ĠCopyright Ġ 2 0 1 6 - Present ĠDat adog , ĠInc . Ċ Ġ*/ Ċ Ċ package Ġcom . datadog . android . rum . internal . domain Ċ Ċ import Ġandroid . content . Context Ċ import Ġcom . datadog . android . core . internal . domain . File Persistence Config Ċ import Ġcom . datadog . android . core . internal . domain . assertj . Persistence Strategy Assert Ċ import Ġcom . datadog . android . core . internal . privacy . Tracking Consent Provider Ċ import Ġcom . datadog . android . utils . forge . Configurator Ċ import Ġcom . datadog . android . utils . mock Context Ċ import Ġfr . xg ou chet . el my r . junit 5 . Forge Configuration Ċ import Ġfr . xg ou chet . el my r . junit 5 . Forge Extension Ċ import Ġjava . io . File Ċ import Ġjava . util . concurrent . ExecutorService Ċ import Ġorg . junit . jupiter . api . BeforeEach Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . junit . jupiter . api . extension . Extend With Ċ import Ġorg . junit . jupiter . api . extension . Extensions Ċ import Ġorg . mockito . Mock Ċ import Ġorg . mockito . junit . jupiter . Mockito Extension Ċ import Ġorg . mockito . junit . jupiter . Mockito Settings Ċ import Ġorg . mockito . quality . Strict ness Ċ Ċ @ Extensions ( ĊĠĠĠ ĠExtend With ( Mockito Extension :: class ), ĊĠĠĠ ĠExtend With ( Forge Extension :: class ) Ċ ) Ċ @ Forge Configuration ( Configurator :: class ) Ċ @ Mockito Settings ( strict ness Ġ= ĠStrict ness . LEN IENT ) Ċ internal Ġclass ĠR um File Strategy Test Ġ{ ĊĠĠĠ Ġlateinit Ġvar Ġtested Strategy : ĠR um File Strategy ĊĊĠĠĠ Ġlateinit Ġvar Ġmocked Context : ĠContext ĊĊĠĠĠ Ġ@ Mock ĊĠĠĠ Ġlateinit Ġvar Ġmock ExecutorService : ĠExecutor Service ĊĊĠĠĠ Ġlateinit Ġvar Ġtracking Consent Provider : ĠTracking Consent Provider ĊĊĠĠĠ Ġ@ BeforeEach ĊĠĠĠ Ġfun Ġ` set Ġup `() Ġ{ ĊĠĠĠĠĠĠĠ Ġmocked Context Ġ= Ġmock Context () ĊĠĠĠĠĠĠĠ Ġtracking Consent Provider Ġ= ĠTracking Consent Provider () ĊĠĠĠĠĠĠĠ Ġtested Strategy Ġ= ĠR um File Strategy ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmocked Context , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdata Persistence ExecutorService Ġ= Ġmock ExecutorService , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtracking Consent Provider Ġ= Ġtracking Consent Provider ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` M Ġcorrectly Ġinitialise Ġthe Ġstrategy ĠW Ġinstantiated `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġabsolute Path Ġ= Ġmocked Context . files Dir . absolute Path ĊĠĠĠĠĠĠĠ Ġval Ġexpected Intermediate FolderPath Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġabsolute Path Ġ+ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠFile . separator Ġ+ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠR um File Strategy . INTER MEDI ATE _ DATA _ FOLDER ĊĠĠĠĠĠĠĠ Ġval Ġexpected Authorized FolderPath Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġabsolute Path Ġ+ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠFile . separator Ġ+ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠR um File Strategy . AUTHORIZ ED _ FOLDER ĊĠĠĠĠĠĠĠ ĠPersistence Strategy Assert ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. assertThat ( tested Strategy ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Intermediate Storage Folder ( expected Intermediate FolderPath ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Authorized Storage Folder ( expected Authorized FolderPath ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. uploads From ( expected Authorized FolderPath ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. uses Consent Aware Async Writer () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Config ( File Persistence Config ( R um File Strategy . MAX _ DELAY _ B ETWEEN _ R UM _ EVENTS _ MS )) ĊĠĠĠ Ġ} Ċ } Ċ