/** Ċ Ġ* ĠDesign ed Ġand Ġdeveloped Ġby ĠAnd rea ĠC ioc care l li Ġ(@ ci oc care l lia ) Ċ Ġ* Ċ Ġ* Ġ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 . ci oc care l lia . k sp refs Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . util . Base 6 4 Ċ import Ġandroidx . test . core . app . Application Provider Ċ import Ġcom . ci oc care l lia . k sp refs . config . Encryption Type Ċ import Ġcom . ci oc care l lia . k sp refs . config . model . Auto Save Policy Ċ import Ġcom . ci oc care l lia . k sp refs . config . model . Commit Strategy Ċ import Ġcom . ci oc care l lia . k sp refs . config . model . Key Size Ċ import Ġcom . google . common . truth . Truth . assertThat Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . ro bo lectric . Ro bo lectric TestRunner Ċ Ċ @ RunWith ( Ro bo lectric TestRunner :: class ) Ċ class ĠCommons Ġ{ ĊĠĠĠ Ġprivate Ġval Ġcontext : ĠContext Ġ= ĠApplication Provider . getApplicationContext () ĊĊĠĠĠ Ġprivate Ġval Ġk sp refs Ġ= ĠK s Prefs ( context ) Ġ{ ĊĠĠĠĠĠĠĠ Ġencryption Type Ġ= ĠEncryption Type . Plain Text () ĊĠĠĠĠĠĠĠ Ġauto Save Ġ= ĠAuto Save Policy . AUT OM AT IC ĊĠĠĠĠĠĠĠ Ġcommit Strategy Ġ= ĠCommit Strategy . AP PLY ĊĠĠĠ Ġ} ĊĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` Check Ġclear () Ġremoval `() Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat ( k sp refs . raw (). isEmpty ()). isTrue () ĊĊĠĠĠĠĠĠĠ Ġk sp refs . push (" test _ key 1 ", Ġ" A ") ĊĠĠĠĠĠĠĠ Ġk sp refs . push (" test _ key 2 ", Ġ" B ") ĊĠĠĠĠĠĠĠ Ġk sp refs . push (" test _ key 3 ", Ġ" C ") ĊĠĠĠĠĠĠĠ Ġk sp refs . clear () ĊĊĠĠĠĠĠĠĠ ĠassertThat ( k sp refs . raw (). isEmpty ()). isTrue () ĊĠĠĠ Ġ} Ċ }