package Ġcom . k re ait . bots . agile . domain . slack . stand up Definition . join . dialog . open Ċ Ċ import Ġcom . k re ait . bots . agile . UnitTest Ċ import Ġcom . k re ait . bots . agile . core . stand up definition . sample Ċ import Ġcom . k re ait . bots . agile . domain . common . data . Stand up Definition Ċ import Ġcom . k re ait . bots . agile . domain . common . data . Stand up Definition Repository Ċ import Ġcom . k re ait . bots . agile . domain . common . service . Slack Message Sender Ċ import Ġcom . k re ait . bots . agile . domain . common . service . UserService Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . any Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . do Return Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . mock Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . times Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . verify Ċ import Ġcom . k re ait . slack . api . contract . jackson . Slack Command Ċ import Ġcom . k re ait . slack . api . contract . jackson . group . dialog . Options Ċ import Ġcom . k re ait . slack . api . contract . jackson . sample Ċ import Ġorg . junit . jupiter . api . DisplayName Ċ import Ġorg . junit . jupiter . api . Test Ċ Ċ @ UnitTest Ċ class ĠJoin Slash CommandHandler Test Ġ{ ĊĊĠĠĠ Ġ@ DisplayName (" test ĠJoin Ġcommand Ġhandler ") ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Join Handler () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġjoin Dialog Opening Service Ġ= Ġmock < Join Dialog Opening Service >() ĊĠĠĠĠĠĠĠ Ġval Ġstand up Definition Repository Ġ= Ġmock < Stand up Definition Repository > Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġon Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġfind ( any (), Ġany (), Ġany (), Ġany (), Ġany (), Ġany (), Ġany (), Ġany (), Ġany (), Ġany (), Ġany (), Ġany ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġdo Return ĠlistOf ( Stand up Definition . sample (). copy ( id Ġ= Ġ" sample Stand up Definition ")) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġval ĠuserService Ġ= Ġmock < UserService >() ĊĠĠĠĠĠĠĠ Ġval Ġmessage Sender Ġ= Ġmock < Slack Message Sender >() ĊĊĠĠĠĠĠĠĠ Ġval Ġjoin Slash CommandHandler Ġ= ĠJoin Slash CommandHandler ( join Dialog Opening Service , Ġstand up Definition Repository , ĠuserService , Ġmessage Sender ) ĊĊĠĠĠĠĠĠĠ Ġval Ġcommand Ġ= ĠSlack Command . sample (). copy ( userId Ġ= Ġ" sample User ", Ġteam Id Ġ= Ġ"") ĊĠĠĠĠĠĠĠ Ġjoin Slash CommandHandler . handle Join Slash Command ( command , Ġ"") ĊĠĠĠĠĠĠĠ Ġverify ( join Dialog Opening Service , Ġtimes ( 1 )). open Stand up Join Dialog ( listOf ( Options (" Workspace ", Ġ" sample Stand up Definition ")), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcommand . trigger Id , Ġcommand . userId , Ġcommand . team Id ) ĊĠĠĠ Ġ} Ċ }