package Ġcash . z . ecc . sdk . model Ċ Ċ import Ġandroidx . test . filters . Small Test Ċ import Ġcash . z . ecc . android . sdk . type . Z cash Network Ċ import Ġcash . z . ecc . sdk . fixture . Persist able Wallet Fixture Ċ import Ġcash . z . ecc . sdk . fixture . Seed Phrase Fixture Ċ import Ġcash . z . ecc . sdk . test . count Ċ import Ġorg . junit . Assert . assertEquals Ċ import Ġorg . junit . Assert . assertFalse Ċ import Ġorg . junit . Assert . assertTrue Ċ import Ġorg . junit . Test Ċ Ċ class ĠPers ist able Wallet Test Ġ{ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Small Test ĊĠĠĠ Ġfun Ġserialize () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġpersist able Wallet Ġ= ĠPers ist able Wallet Fixture . new () ĊĊĠĠĠĠĠĠĠ Ġval ĠjsonObject Ġ= Ġpersist able Wallet . toJson () ĊĠĠĠĠĠĠĠ ĠassertEquals ( 4 , ĠjsonObject . keys (). count ()) ĊĠĠĠĠĠĠĠ ĠassertTrue ( jsonObject . has ( Persist able Wallet . KEY _ VERSION )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( jsonObject . has ( Persist able Wallet . KEY _ NETWORK _ ID )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( jsonObject . has ( Persist able Wallet . KEY _ SEED _ PH R ASE )) ĊĠĠĠĠĠĠĠ ĠassertTrue ( jsonObject . has ( Persist able Wallet . KEY _ B IR TH DAY )) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( 1 , ĠjsonObject . getInt ( Persist able Wallet . KEY _ VERSION )) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Z cash Network . Test net . id , ĠjsonObject . getInt ( Persist able Wallet . KEY _ NETWORK _ ID )) ĊĠĠĠĠĠĠĠ ĠassertEquals ( Persist able Wallet Fixture . SEED _ PH R ASE . join ToString (), ĠjsonObject . getString ( Persist able Wallet . KEY _ SEED _ PH R ASE )) ĊĊĠĠĠĠĠĠĠ Ġ// ĠB irth day Ġserialization Ġis Ġtested Ġin Ġa Ġseparate Ġfile ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Small Test ĊĠĠĠ Ġfun Ġround _ trip () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġpersist able Wallet Ġ= ĠPers ist able Wallet Fixture . new () ĊĊĠĠĠĠĠĠĠ Ġval Ġdeserialized Ġ= ĠPers ist able Wallet . from ( persist able Wallet . toJson ()) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( persist able Wallet , Ġdeserialized ) ĊĠĠĠĠĠĠĠ ĠassertFalse ( persist able Wallet Ġ=== Ġdeserialized ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Small Test ĊĠĠĠ Ġfun ĠtoString _ security () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġactual Ġ= ĠPers ist able Wallet Fixture . new (). toString () ĊĊĠĠĠĠĠĠĠ ĠassertFalse ( actual . contains ( Seed Phrase Fixture . SEED _ PH R ASE )) ĊĠĠĠ Ġ} Ċ } Ċ