package Ġorg . tg travis . event . no ification Ċ Ċ import Ġorg . mockito . Mockito .` when ` Ċ import Ġorg . mockito . Mockito . any String Ċ import Ġorg . mockito . Mockito . eq Ċ import Ġorg . mockito . Mockito . spy Ċ import Ġorg . mockito . Mockito . verify Ċ import Ġorg . tg travis . model . User Ċ import Ġkotlin . test . Test Ċ Ċ class ĠBuild Notification Test Ġ: ĠAbstract Notification Test () Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġsends Message To Empty Set Of Watch ers () Ġ{ ĊĠĠĠĠĠĠĠ Ġ` when `( notification . repo Name ). thenReturn (" repo ") ĊĠĠĠĠĠĠĠ Ġ` when `( service . retrieve Users (" repo ")). thenReturn ( empty Set ()) ĊĠĠĠĠĠĠĠ Ġval Ġbuild Notification Ġ= Ġspy ( Build Notification ( bot , Ġnotification )) ĊĠĠĠĠĠĠĠ Ġbuild Notification . process () ĊĠĠĠĠĠĠĠ Ġverify ( build Notification ). notify Users ( eq ( empty Set ()) Ġ?: Ġempty Set (), Ġany String ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġsends Message To Set Of Users () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġusers Ġ= Ġset Of ( User ( 1 ), ĠUser ( 2 )) ĊĠĠĠĠĠĠĠ Ġ` when `( notification . repo Name ). thenReturn (" repo ") ĊĠĠĠĠĠĠĠ Ġ` when `( service . retrieve Users (" repo ")). thenReturn ( users ) ĊĠĠĠĠĠĠĠ Ġval Ġbuild Notification Ġ= Ġspy ( Build Notification ( bot , Ġnotification )) ĊĠĠĠĠĠĠĠ Ġbuild Notification . process () ĊĠĠĠĠĠĠĠ Ġverify ( build Notification ). notify Users ( eq ( users ) Ġ?: Ġusers , Ġany String ()) ĊĠĠĠ Ġ} Ċ } Ċ