package Ġch . lead rian . samp . k amp . streamer . runtime . entity Ċ Ċ import Ġch . lead rian . samp . k amp . core . api . constants . Race Checkpoint Type Ċ import Ġch . lead rian . samp . k amp . core . api . data . location Of Ċ import Ġch . lead rian . samp . k amp . core . api . data . vector 3 D Of Ċ import Ġch . lead rian . samp . k amp . core . api . entity . Player Ċ import Ġch . lead rian . samp . k amp . core . api . entity . Race Checkpoint Ċ import Ġch . lead rian . samp . k amp . core . api . service . Race Checkpoint Service Ċ import Ġch . lead rian . samp . k amp . streamer . runtime . Race Checkpoint Stream er Ċ import Ġch . lead rian . samp . k amp . streamer . runtime . callback . On Player Enter Stream able Race Checkpoint Handler Ċ import Ġch . lead rian . samp . k amp . streamer . runtime . callback . On Player Enter Stream able Race Checkpoint Receiver Delegate Ċ import Ġch . lead rian . samp . k amp . streamer . runtime . callback . On Player Leave Stream able Race Checkpoint Handler Ċ import Ġch . lead rian . samp . k amp . streamer . runtime . callback . On Player Leave Stream able Race Checkpoint Receiver Delegate Ċ import Ġch . lead rian . samp . k amp . streamer . runtime . callback . On Stream able Race Checkpoint Stream In Handler Ċ import Ġch . lead rian . samp . k amp . streamer . runtime . callback . On Stream able Race Checkpoint Stream In Receiver Delegate Ċ import Ġch . lead rian . samp . k amp . streamer . runtime . callback . On Stream able Race Checkpoint Stream Out Handler Ċ import Ġch . lead rian . samp . k amp . streamer . runtime . callback . On Stream able Race Checkpoint Stream Out Receiver Delegate Ċ import Ġcom . con vers ant media . util . collection . geometry . Rect 3 d Ċ import Ġio . mock k . Runs Ċ import Ġio . mock k . clear Mocks Ċ import Ġio . mock k . every Ċ import Ġio . mock k . just Ċ import Ġio . mock k . mock k Ċ import Ġio . mock k . verify Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . assertj . core . api . Assertions . catch Throwable Ċ import Ġorg . assertj . core . data . Percentage Ċ import Ġorg . junit . jupiter . api . BeforeEach Ċ import Ġorg . junit . jupiter . api . Nested Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . junit . jupiter . params . Parameterized Test Ċ import Ġorg . junit . jupiter . params . provider . Value Source Ċ Ċ internal Ġclass ĠStream able Race Checkpoint Impl Test Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġstream able Race Checkpoint : ĠStream able Race Checkpoint Impl ĊĠĠĠ Ġprivate Ġval Ġrace Checkpoint Stream er : ĠRace Checkpoint Stream er Ġ= Ġmock k () ĊĠĠĠ Ġprivate Ġval Ġrace Checkpoint Service : ĠRace Checkpoint Service Ġ= Ġmock k () ĊĠĠĠ Ġprivate Ġval Ġon Stream able Race Checkpoint Stream In Handler : ĠOn Stream able Race Checkpoint Stream In Handler Ġ= Ġmock k () ĊĠĠĠ Ġprivate Ġval Ġon Stream able Race Checkpoint Stream Out Handler : ĠOn Stream able Race Checkpoint Stream Out Handler Ġ= Ġmock k () ĊĠĠĠ Ġprivate Ġval Ġon Player Enter Stream able Race Checkpoint Handler : ĠOn Player Enter Stream able Race Checkpoint Handler Ġ= Ġmock k () ĊĠĠĠ Ġprivate Ġval Ġon Player Leave Stream able Race Checkpoint Handler : ĠOn Player Leave Stream able Race Checkpoint Handler Ġ= Ġmock k () ĊĠĠĠ Ġprivate Ġval Ġon Stream able Race Checkpoint Stream In Receiver : ĠOn Stream able Race Checkpoint Stream In Receiver Delegate Ġ= Ġmock k () ĊĠĠĠ Ġprivate Ġval Ġon Stream able Race Checkpoint Stream Out Receiver : ĠOn Stream able Race Checkpoint Stream Out Receiver Delegate Ġ= Ġmock k () ĊĠĠĠ Ġprivate Ġval Ġon Player Enter Stream able Race Checkpoint Receiver : ĠOn Player Enter Stream able Race Checkpoint Receiver Delegate Ġ= Ġmock k () ĊĠĠĠ Ġprivate Ġval Ġon Player Leave Stream able Race Checkpoint Receiver : ĠOn Player Leave Stream able Race Checkpoint Receiver Delegate Ġ= Ġmock k () ĊĠĠĠ Ġprivate Ġval Ġrace Checkpoint Ġ= Ġmock k < Race Checkpoint >() ĊĊĠĠĠ Ġ@ BeforeEach ĊĠĠĠ Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġrace Checkpoint . add On Player Enter Race Checkpoint Listener ( any ()) Ġ} Ġjust ĠRuns ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġrace Checkpoint . add On Player Leave Race Checkpoint Listener ( any ()) Ġ} Ġjust ĠRuns ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġrace Checkpoint Service . create Race Checkpoint ( any (), Ġany (), Ġany (), Ġany ()) Ġ} Ġreturns Ġrace Checkpoint ĊĠĠĠĠĠĠĠ Ġstream able Race Checkpoint Ġ= ĠStream able Race Checkpoint Impl ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcoordinates Ġ= Ġvector 3 D Of ( 1 f , Ġ 2 f , Ġ 3 f ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġsize Ġ= Ġ 4 f , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtype Ġ= ĠRace Checkpoint Type . AIR _ FIN ISH , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnext Coordinates Ġ= Ġvector 3 D Of ( 1 0 0 1 f , Ġ 2 0 0 2 f , Ġ 3 0 0 3 f ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinterior Ids Ġ= Ġmutable Set Of ( 6 9 ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġvirtual World Ids Ġ= Ġmutable Set Of ( 1 3 3 7 ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġpriority Ġ= Ġ 1 2 3 , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġstream Distance Ġ= Ġ 7 5 f , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġrace Checkpoint Stream er Ġ= Ġrace Checkpoint Stream er , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġrace Checkpoint Service Ġ= Ġrace Checkpoint Service , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Stream able Race Checkpoint Stream In Handler Ġ= Ġon Stream able Race Checkpoint Stream In Handler , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Stream able Race Checkpoint Stream Out Handler Ġ= Ġon Stream able Race Checkpoint Stream Out Handler , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Player Enter Stream able Race Checkpoint Handler Ġ= Ġon Player Enter Stream able Race Checkpoint Handler , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Player Leave Stream able Race Checkpoint Handler Ġ= Ġon Player Leave Stream able Race Checkpoint Handler , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Stream able Race Checkpoint Stream In Receiver Ġ= Ġon Stream able Race Checkpoint Stream In Receiver , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Stream able Race Checkpoint Stream Out Receiver Ġ= Ġon Stream able Race Checkpoint Stream Out Receiver , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Player Enter Stream able Race Checkpoint Receiver Ġ= Ġon Player Enter Stream able Race Checkpoint Receiver , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Player Leave Stream able Race Checkpoint Receiver Ġ= Ġon Player Leave Stream able Race Checkpoint Receiver ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Nested ĊĠĠĠ Ġinner Ġclass ĠPrimitive Race Checkpoint Tests Ġ{ ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould Create Race Checkpoint () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġrace Checkpoint Service . create Race Checkpoint ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcoordinates Ġ= Ġvector 3 D Of ( 1 f , Ġ 2 f , Ġ 3 f ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġsize Ġ= Ġ 4 f , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtype Ġ= ĠRace Checkpoint Type . AIR _ FIN ISH , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnext Coordinates Ġ= Ġvector 3 D Of ( 1 0 0 1 f , Ġ 2 0 0 2 f , Ġ 3 0 0 3 f ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould Register Stream able Race Checkpoint As On Player Enter Race Checkpoint Listener () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġrace Checkpoint . add On Player Enter Race Checkpoint Listener ( stream able Race Checkpoint ) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould Register Stream able Race Checkpoint As On Player Leave Race Checkpoint Listener () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġrace Checkpoint . add On Player Leave Race Checkpoint Listener ( stream able Race Checkpoint ) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Nested ĊĠĠĠ Ġinner Ġclass ĠCoordinates Tests Ġ{ ĊĊĠĠĠĠĠĠĠ Ġ@ BeforeEach ĊĠĠĠĠĠĠĠ Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġrace Checkpoint Stream er . on BoundingBox Change ( any ()) Ġ} Ġjust ĠRuns ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould Set Race Checkpoint Coordinates () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġrace Checkpoint . coordinates Ġ= Ġany () Ġ} Ġjust ĠRuns ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . coordinates Ġ= Ġvector 3 D Of ( 1 1 f , Ġ 2 2 f , Ġ 3 3 f ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġrace Checkpoint . coordinates Ġ= Ġvector 3 D Of ( 1 1 f , Ġ 2 2 f , Ġ 3 3 f ) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġset Should Call Stream er () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġrace Checkpoint . coordinates Ġ= Ġany () Ġ} Ġjust ĠRuns ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . coordinates Ġ= Ġvector 3 D Of ( 1 1 f , Ġ 2 2 f , Ġ 3 3 f ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġrace Checkpoint Stream er . on BoundingBox Change ( stream able Race Checkpoint ) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould Get Coordinates From Race Checkpoint () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġrace Checkpoint . coordinates Ġ} Ġreturns Ġvector 3 D Of ( 1 1 f , Ġ 2 2 f , Ġ 3 3 f ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcoordinates Ġ= Ġstream able Race Checkpoint . coordinates ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( coordinates ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. isEqualTo ( vector 3 D Of ( 1 1 f , Ġ 2 2 f , Ġ 3 3 f )) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Nested ĊĠĠĠ Ġinner Ġclass ĠNext Coordinates Tests Ġ{ ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould Set Race Checkpoint Next Coordinates () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġrace Checkpoint . next Coordinates Ġ= Ġany () Ġ} Ġjust ĠRuns ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . next Coordinates Ġ= Ġvector 3 D Of ( 1 1 f , Ġ 2 2 f , Ġ 3 3 f ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġrace Checkpoint . next Coordinates Ġ= Ġvector 3 D Of ( 1 1 f , Ġ 2 2 f , Ġ 3 3 f ) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould GetNext Coordinates From Race Checkpoint () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġrace Checkpoint . next Coordinates Ġ} Ġreturns Ġvector 3 D Of ( 1 1 f , Ġ 2 2 f , Ġ 3 3 f ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġnext Coordinates Ġ= Ġstream able Race Checkpoint . next Coordinates ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( next Coordinates ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. isEqualTo ( vector 3 D Of ( 1 1 f , Ġ 2 2 f , Ġ 3 3 f )) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Nested ĊĠĠĠ Ġinner Ġclass ĠSize Tests Ġ{ ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould SetSize OnR ace Checkpoint () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġrace Checkpoint . size Ġ= Ġany () Ġ} Ġjust ĠRuns ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . size Ġ= Ġ 4 4 f ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġrace Checkpoint . size Ġ= Ġ 4 4 f Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould GetSize From Race Checkpoint () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġrace Checkpoint . size Ġ} Ġreturns Ġ 4 4 f ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( stream able Race Checkpoint . size ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. isEqualTo ( 4 4 f ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Nested ĊĠĠĠ Ġinner Ġclass ĠType Tests Ġ{ ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould Set Type OnR ace Checkpoint () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġrace Checkpoint . type Ġ= Ġany () Ġ} Ġjust ĠRuns ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . type Ġ= ĠRace Checkpoint Type . AIR _ FIN ISH ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġrace Checkpoint . type Ġ= ĠRace Checkpoint Type . AIR _ FIN ISH Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould GetType From Race Checkpoint () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġrace Checkpoint . type Ġ} Ġreturns ĠRace Checkpoint Type . AIR _ FIN ISH ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( stream able Race Checkpoint . type ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. isEqualTo ( Race Checkpoint Type . AIR _ FIN ISH ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Nested ĊĠĠĠ Ġinner Ġclass ĠVisibility Tests Ġ{ ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġis Visible Should Return True ByDefault () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġplayer Ġ= Ġmock k < Player >() ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġis Visible Ġ= Ġstream able Race Checkpoint . isVisible ( player ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( isVisible ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. isTrue () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġgiven True Condition Is Visible Should Return True () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġplayer Ġ= Ġmock k < Player >() ĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . visible When Ġ{ Ġp Ġ-> Ġp Ġ== Ġplayer Ġ} ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġis Visible Ġ= Ġstream able Race Checkpoint . isVisible ( player ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( isVisible ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. isTrue () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġgiven False Condition Is Visible Should Return False () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġplayer Ġ= Ġmock k < Player >() ĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . visible When Ġ{ Ġp Ġ-> Ġp Ġ!= Ġplayer Ġ} ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġis Visible Ġ= Ġstream able Race Checkpoint . isVisible ( player ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( isVisible ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. isFalse () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Parameterized Test ĊĠĠĠ Ġ@ Value Source ( strings Ġ= Ġ[" true ", Ġ" false "]) ĊĠĠĠ Ġfun Ġcontains Should Return True If And Only If St reamed In Race Checkpoint Contains Player ( expected Contains : ĠBoolean ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġplayer Ġ= Ġmock k < Player >() ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġrace Checkpoint . contains ( player ) Ġ} Ġreturns Ġexpected Contains ĊĊĠĠĠĠĠĠĠ Ġval Ġcontains Ġ= Ġstream able Race Checkpoint . contains ( player ) ĊĊĠĠĠĠĠĠĠ ĠassertThat ( contains ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. isEqualTo ( expected Contains ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Nested ĊĠĠĠ Ġinner Ġclass ĠIs St reamed In Tests Ġ{ ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġgiven Race Checkpoint Is Player Race Checkpoint It Should Return True () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġplayer Ġ= Ġmock k < Player >() ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġplayer . race Checkpoint Ġ} Ġreturns Ġrace Checkpoint ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġis St reamed In Ġ= Ġstream able Race Checkpoint . is St reamed In ( player ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( is St reamed In ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. isTrue () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġgiven Race Checkpoint Is Player Race Checkpoint IsNull It Should Return False () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġplayer Ġ= Ġmock k < Player >() ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġplayer . race Checkpoint Ġ} Ġreturns Ġnull ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġis St reamed In Ġ= Ġstream able Race Checkpoint . is St reamed In ( player ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( is St reamed In ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. isFalse () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġgiven Race Checkpoint Is Player Race Checkpoint Is Other Race Checkpoint It Should Return False () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġother Race Checkpoint Ġ= Ġmock k < Race Checkpoint >() ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġplayer Ġ= Ġmock k < Player >() ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġplayer . race Checkpoint Ġ} Ġreturns Ġother Race Checkpoint ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġis St reamed In Ġ= Ġstream able Race Checkpoint . is St reamed In ( player ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( is St reamed In ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. isFalse () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Nested ĊĠĠĠ Ġinner Ġclass ĠOn Stream In Tests Ġ{ ĊĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġplayer Ġ= Ġmock k < Player >() ĊĊĠĠĠĠĠĠĠ Ġ@ BeforeEach ĊĠĠĠĠĠĠĠ Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġplayer . race Checkpoint Ġ} Ġreturns Ġnull ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġplayer . race Checkpoint Ġ= Ġrace Checkpoint Ġ} Ġjust ĠRuns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Stream able Race Checkpoint Stream In Handler . on Stream able Race Checkpoint Stream In ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġjust ĠRuns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Stream able Race Checkpoint Stream In Receiver . on Stream able Race Checkpoint Stream In ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġjust ĠRuns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . on Stream In ( player ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould Set Player Race Checkpoint () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġplayer . race Checkpoint Ġ= Ġrace Checkpoint Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġgiven Race Checkpoint Is Already St reamed In On Stream In Should Throw Exception () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġclear Mocks ( player , Ġon Stream able Race Checkpoint Stream In Handler , Ġon Stream able Race Checkpoint Stream In Receiver ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġplayer . race Checkpoint Ġ} Ġreturns Ġrace Checkpoint ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcaught Throwable Ġ= Ġcatch Throwable Ġ{ Ġstream able Race Checkpoint . on Stream In ( player ) Ġ} ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( caught Throwable ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. isInstanceOf ( IllegalStateException :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Message (" Stream able Ġrace Checkpoint Ġis Ġalready Ġst reamed Ġin ") ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Nested ĊĠĠĠ Ġinner Ġclass ĠOn Stream Out Tests Ġ{ ĊĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġplayer Ġ= Ġmock k < Player >() ĊĊĠĠĠĠĠĠĠ Ġ@ BeforeEach ĊĠĠĠĠĠĠĠ Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġplayer . race Checkpoint Ġ} Ġreturns Ġnull ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġplayer . race Checkpoint Ġ= Ġrace Checkpoint Ġ} Ġjust ĠRuns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġplayer . race Checkpoint Ġ= Ġnull Ġ} Ġjust ĠRuns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Stream able Race Checkpoint Stream In Handler . on Stream able Race Checkpoint Stream In ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġjust ĠRuns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Stream able Race Checkpoint Stream In Receiver . on Stream able Race Checkpoint Stream In ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġjust ĠRuns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Stream able Race Checkpoint Stream Out Handler . on Stream able Race Checkpoint Stream Out ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġjust ĠRuns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Stream able Race Checkpoint Stream Out Receiver . on Stream able Race Checkpoint Stream Out ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġjust ĠRuns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . on Stream In ( player ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġplayer . race Checkpoint Ġ} Ġreturns Ġrace Checkpoint ĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . on Stream Out ( player ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould Remove Player Race Checkpoint () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġplayer . race Checkpoint Ġ= Ġnull Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġgiven Race Checkpoint Is Already St reamed Out On Stream Out Should Do Nothing () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġclear Mocks ( player , Ġon Stream able Race Checkpoint Stream Out Handler , Ġon Stream able Race Checkpoint Stream Out Receiver ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġplayer . race Checkpoint Ġ} Ġreturns Ġnull ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcaught Throwable Ġ= Ġcatch Throwable Ġ{ Ġstream able Race Checkpoint . on Stream Out ( player ) Ġ} ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( caught Throwable ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. isNull () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Nested ĊĠĠĠ Ġinner Ġclass ĠOn Player Enter Race Checkpoint Tests Ġ{ ĊĊĠĠĠĠĠĠĠ Ġ@ BeforeEach ĊĠĠĠĠĠĠĠ Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Player Enter Stream able Race Checkpoint Receiver . on Player Enter Stream able Race Checkpoint ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġjust ĠRuns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Player Enter Stream able Race Checkpoint Handler . on Player Enter Stream able Race Checkpoint ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġjust ĠRuns ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould Call On Player Enter Stream able Race Checkpoint Receiver () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġplayer Ġ= Ġmock k < Player >() ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . on Player Enter Race Checkpoint ( player ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Player Enter Stream able Race Checkpoint Receiver . on Player Enter Stream able Race Checkpoint ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġplayer , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould Call On Player Enter Stream able Race Checkpoint Handler () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġplayer Ġ= Ġmock k < Player >() ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . on Player Enter Race Checkpoint ( player ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Player Enter Stream able Race Checkpoint Handler . on Player Enter Stream able Race Checkpoint ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġplayer , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Nested ĊĠĠĠ Ġinner Ġclass ĠOn Player Leave Race Checkpoint Tests Ġ{ ĊĊĠĠĠĠĠĠĠ Ġ@ BeforeEach ĊĠĠĠĠĠĠĠ Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Player Leave Stream able Race Checkpoint Receiver . on Player Leave Stream able Race Checkpoint ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġjust ĠRuns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Player Leave Stream able Race Checkpoint Handler . on Player Leave Stream able Race Checkpoint ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġany () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġjust ĠRuns ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould Call On Player Leave Stream able Race Checkpoint Receiver () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġplayer Ġ= Ġmock k < Player >() ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . on Player Leave Race Checkpoint ( player ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Player Leave Stream able Race Checkpoint Receiver . on Player Leave Stream able Race Checkpoint ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġplayer , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould Call On Player Leave Stream able Race Checkpoint Handler () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġplayer Ġ= Ġmock k < Player >() ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . on Player Leave Race Checkpoint ( player ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Player Leave Stream able Race Checkpoint Handler . on Player Leave Stream able Race Checkpoint ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġplayer , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġis Destroyed Should Init ially Not Be Destroyed () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġis Destroyed Ġ= Ġstream able Race Checkpoint . is Destroyed ĊĊĠĠĠĠĠĠĠ ĠassertThat ( is Destroyed ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. isFalse () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Nested ĊĠĠĠ Ġinner Ġclass ĠDestroy Tests Ġ{ ĊĊĠĠĠĠĠĠĠ Ġ@ BeforeEach ĊĠĠĠĠĠĠĠ Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġrace Checkpoint . destroy () Ġ} Ġjust ĠRuns ĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . destroy () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould Destroy St reamed In Race Check points () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġverify Ġ{ Ġrace Checkpoint . destroy () Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġgiven Destroy Was Called Is Destroyed Should Return True () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġis Destroyed Ġ= Ġstream able Race Checkpoint . is Destroyed ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( is Destroyed ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. isTrue () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġshould Return BoundingBox () Ġ{ ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġrace Checkpoint . coordinates Ġ} Ġreturns Ġvector 3 D Of ( 2 0 0 f , Ġ 3 0 0 f , Ġ 4 0 0 f ) ĊĊĠĠĠĠĠĠĠ Ġval Ġbounding Box Ġ= Ġstream able Race Checkpoint . bounding Box ĊĊĠĠĠĠĠĠĠ ĠassertThat ( bounding Box ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. isEqualTo ( Rect 3 d ( 1 2 5 . 0 , Ġ 2 2 5 . 0 , Ġ 3 2 5 . 0 , Ġ 2 7 5 . 0 , Ġ 3 7 5 . 0 , Ġ 4 7 5 . 0 )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Nested ĊĠĠĠ Ġinner Ġclass ĠDistance To Tests Ġ{ ĊĊĠĠĠĠĠĠĠ Ġ@ BeforeEach ĊĠĠĠĠĠĠĠ Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġrace Checkpoint . coordinates Ġ} Ġreturns Ġvector 3 D Of ( 1 f , Ġ 2 f , Ġ 3 f ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġshould Return Distance To Location () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġlocation Ġ= Ġlocation Of ( 1 0 f , Ġ 2 f , Ġ 3 f , Ġinterior Id Ġ= Ġ 6 9 , Ġworld Id Ġ= Ġ 1 3 3 7 ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġdistance Ġ= Ġstream able Race Checkpoint . distance To ( location ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( distance ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. is Close To ( 9 f , ĠPer centage . with Percentage ( 0 . 0 1 )) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġgiven No Interior Ids And Virtual World Ids It Should Return Distance To Location () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġlocation Ġ= Ġlocation Of ( 1 0 f , Ġ 2 f , Ġ 3 f , Ġinterior Id Ġ= Ġ 6 9 , Ġworld Id Ġ= Ġ 1 3 3 7 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . inter ior Ids Ġ= Ġmutable Set Of () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . virtual World Ids Ġ= Ġmutable Set Of () ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġdistance Ġ= Ġstream able Race Checkpoint . distance To ( location ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( distance ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. is Close To ( 9 f , ĠPer centage . with Percentage ( 0 . 0 1 )) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġgiven Map Object IsNot In Interior It Should Return Float Max () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġlocation Ġ= Ġlocation Of ( 1 f , Ġ 2 f , Ġ 3 f , Ġinterior Id Ġ= Ġ 1 , Ġworld Id Ġ= Ġ 4 5 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . inter ior Ids Ġ= Ġmutable Set Of ( 0 ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġdistance Ġ= Ġstream able Race Checkpoint . distance To ( location ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( distance ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. isEqualTo ( Float . MAX _ VALUE ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ@ Test ĊĠĠĠĠĠĠĠ Ġfun Ġgiven Map Object IsNot In Virtual World It Should Return Float Max () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġlocation Ġ= Ġlocation Of ( 1 f , Ġ 2 f , Ġ 3 f , Ġinterior Id Ġ= Ġ 1 , Ġworld Id Ġ= Ġ 4 5 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġstream able Race Checkpoint . virtual World Ids Ġ= Ġmutable Set Of ( 0 ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġdistance Ġ= Ġstream able Race Checkpoint . distance To ( location ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertThat ( distance ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. isEqualTo ( Float . MAX _ VALUE ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġ} Ċ }