package Ġnet . cord a . client . mock Ċ Ċ import Ġnet . cord a . core . contracts . Amount Ċ import Ġnet . cord a . core . identity . Party Ċ import Ġnet . cord a . core . serialization . Opaque Bytes Ċ import Ġnet . cord a . flows . Cash Flow Command Ċ import Ġjava . util .* Ċ Ċ /** Ċ Ġ* Ġ[ Generator ] s Ġfor Ġincoming / outgoing Ġevents Ġto / from Ġthe Ġ[ Wallet Monitor Service ]. ĠIntern ally Ġit Ġkeeps Ġtrack Ġof Ġowned Ċ Ġ* Ġstate / ref Ġpairs , Ġbut Ġit Ġdoesn 't Ġnecessarily Ġgenerate Ġ" correct " Ġevents ! Ċ Ġ*/ Ċ Ċ class ĠEvent Generator ( val Ġparties : ĠList < Party >, Ġval Ġc urrencies : ĠList < Currency >, Ġval Ġnot ary : ĠParty ) Ġ{ ĊĠĠĠ Ġprivate Ġval Ġparty Generator Ġ= ĠGenerator . pick One ( part ies ) ĊĠĠĠ Ġprivate Ġval Ġissue Ref Generator Ġ= ĠGenerator . int Range ( 0 , Ġ 1 ). map Ġ{ Ġnumber Ġ-> ĠO pa que Bytes ( ByteArray ( 1 , Ġ{ Ġnumber . to Byte () Ġ})) Ġ} ĊĠĠĠ Ġprivate Ġval Ġamount Generator Ġ= ĠGenerator . long Range ( 1 0 0 0 0 , Ġ 1 0 0 0 0 0 0 ) ĊĠĠĠ Ġprivate Ġval Ġcurrency Generator Ġ= ĠGenerator . pick One ( currencies ) ĊĊĠĠĠ Ġprivate Ġval Ġissue Cash Generator Ġ= Ġamount Generator . combine ( party Generator , Ġissue Ref Generator , Ġcurrency Generator ) Ġ{ Ġamount , Ġto , Ġissue Ref , Ġc cy Ġ-> ĊĠĠĠĠĠĠĠ ĠCash Flow Command . Issue Cash ( Amount ( amount , Ġc cy ), Ġissue Ref , Ġto , Ġnot ary ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġval Ġexit Cash Generator Ġ= Ġamount Generator . combine ( issue Ref Generator , Ġcurrency Generator ) Ġ{ Ġamount , Ġissue Ref , Ġc cy Ġ-> ĊĠĠĠĠĠĠĠ ĠCash Flow Command . Exit Cash ( Amount ( amount , Ġc cy ), Ġissue Ref ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġval Ġmove Cash Generator Ġ= Ġamount Generator . combine ( party Generator , Ġcurrency Generator ) Ġ{ Ġamount Iss ued , Ġrecipient , Ġcurrency Ġ-> ĊĠĠĠĠĠĠĠ ĠCash Flow Command . Pay Cash ( Amount ( amount Iss ued , Ġcurrency ), Ġrecipient ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġval Ġissuer Generator Ġ= ĠGenerator . frequency ( listOf ( ĊĠĠĠĠĠĠĠĠĠĠĠĠ 0 . 1 Ġto Ġexit Cash Generator , ĊĠĠĠĠĠĠĠĠĠĠĠĠ 0 . 9 Ġto Ġissue Cash Generator ĊĠĠĠ Ġ)) Ċ } Ċ