package Ġorg . simple . clin ic . bpp ass port gen . generator Ċ Ċ import Ġorg . junit . Test Ċ import Ġorg . mockito . Mockito Ċ import Ġorg . mockito . kotlin . mock Ċ import Ġorg . mockito . kotlin . verify Ċ import Ġorg . simple . bpp ass port gen . Pass ports Generator Ċ import Ġorg . simple . bpp ass port gen . generator . Generate Bp Pass ports Ċ import Ġorg . simple . bpp ass port gen . generator . Generator Type Ċ import Ġorg . simple . bpp ass port gen . generator . Pass ports Generated Ċ import Ġorg . simple . bpp ass port gen . generator . Pass ports Generator Effect Handler Ċ import Ġorg . simple . clin ic . bpp ass port gen . scheduler . Test Schedulers Provider Ċ import Ġorg . simple . clin ic . bpp ass port gen . util . Effect Handler TestCase Ċ import Ġjava . io . File Ċ import Ġjava . util . UUID Ċ Ċ class ĠPass ports Generator Effect Handler Test Ġ{ ĊĊĠ Ġprivate Ġval Ġpass ports Generator Ġ= Ġmock < Pass ports Generator >() ĊĊĠ Ġprivate Ġval Ġeffect Handler Ġ= ĠPass ports Generator Effect Handler ( ĊĠĠĠĠĠ Ġpass ports Generator Ġ= Ġpass ports Generator , ĊĠĠĠĠĠ Ġs chedulers Provider Ġ= ĠTest Schedulers Provider () ĊĠ Ġ). build () ĊĠ Ġprivate Ġval Ġeffect Handler TestCase Ġ= ĠEffect Handler TestCase ( effect Handler ) ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` when Ġgenerate Ġbp Ġpass ports Ġeffect Ġis Ġreceived , Ġthen Ġgenerate Ġthe Ġpass ports `() Ġ{ ĊĠĠĠ Ġ// Ġgiven ĊĠĠĠ Ġval Ġuuid Ġ= ĠUUID . fromString (" b 6 bf 0 aaf - 9 6 0 e - 4 3 8 9 - b 6 8 3 - 7 9 0 cf 9 6 0 9 3 3 d ") ĊĊĠĠĠ ĠMockito . mock Static ( UUID :: class . java ) ĊĠĠĠĠĠĠĠ Ġ. ` when `< UUID >( UUID :: randomUUID ) ĊĠĠĠĠĠĠĠ Ġ. thenReturn ( uuid ) ĊĊĠĠĠ Ġ// Ġwhen ĊĠĠĠ Ġeffect Handler TestCase . dispatch ( Generate Bp Pass ports ( ĊĠĠĠĠĠĠĠ Ġtemplate FilePath Ġ= Ġ"/ template - file . pdf ", ĊĠĠĠĠĠĠĠ Ġoutput DirectoryPath Ġ= Ġ"/ pass ports ", ĊĠĠĠĠĠĠĠ ĠnumberOf Pass ports Ġ= Ġ 1 , ĊĠĠĠĠĠĠĠ Ġrow Count Ġ= Ġ 2 , ĊĠĠĠĠĠĠĠ Ġcolumn Count Ġ= Ġ 2 , ĊĠĠĠĠĠĠĠ Ġgenerator Type Ġ= ĠGenerator Type . Passport ĊĠĠĠ Ġ)) ĊĊĠĠĠ Ġ// Ġthen ĊĠĠĠ Ġverify ( pass ports Generator ). run ( ĊĠĠĠĠĠĠĠ Ġuuid sTo Generate Ġ= ĠlistOf ( uuid ), ĊĠĠĠĠĠĠĠ Ġrow Count Ġ= Ġ 2 , ĊĠĠĠĠĠĠĠ Ġcolumn Count Ġ= Ġ 2 , ĊĠĠĠĠĠĠĠ Ġtemplate FilePath Ġ= Ġ"/ template - file . pdf ", ĊĠĠĠĠĠĠĠ Ġoutput Directory Ġ= ĠFile ("/ pass ports "), ĊĠĠĠĠĠĠĠ Ġgenerator Type Ġ= ĠGenerator Type . Passport ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġeffect Handler TestCase . assert Outgoing Events ( Pass ports Generated ) ĊĠ Ġ} Ċ } Ċ