package Ġio . m verse . k slack Ċ Ċ import Ġio . m verse . k slack . api . methods . Slack ApiException Ċ import Ġio . m verse . k slack . api . methods . request . d nd . D nd Info Request Ċ import Ġio . m verse . k slack . api . methods . request . d nd . D nd Team Info Request Ċ import Ġio . m verse . k slack . api . methods . request . users . Users List Request Ċ import Ġio . m verse . k slack . api . methods . response . d nd . D nd Team Info Response Ċ import Ġorg . hamcrest . Core Matchers .` is ` Ċ import Ġorg . hamcrest . Core Matchers . notNull Value Ċ import Ġorg . junit . Assert . assertThat Ċ import Ġorg . junit . Test Ċ import Ġjava . io . IOException Ċ Ċ class ĠSlack _ d nd _ Test Ġ{ ĊĊĠ Ġinternal Ġvar Ġslack Ġ= Ġio . m verse . k slack . Slack () ĊĊĠ Ġ@ Test ĊĠ Ġ@ Throws ( IOException :: class , ĠSlack ApiException :: class ) ĊĠ Ġfun Ġd nd () Ġ{ ĊĠĠĠ Ġval Ġtoken Ġ= ĠSystem . getenv ( Constants . SL ACK _ TEST _ O AUTH _ ACCESS _ TOKEN ) ĊĊĠĠĠ Ġval Ġmembers Ġ= Ġslack . users List ( Users List Request ( token Ġ= Ġtoken , Ġis Presence Ġ= Ġ( true ))). members ĊĠĠĠ Ġrun Ġ{ ĊĠĠĠĠĠ Ġval Ġuser Ġ= Ġmembers ! ![ 0 ]. id ĊĠĠĠĠĠ Ġval Ġresponse Ġ= Ġslack . d nd Info ( D nd Info Request ( token Ġ= Ġtoken , Ġuser Ġ= Ġ( user ))) ĊĠĠĠĠĠ ĠassertThat ( response . ok , Ġ` is `( true )) ĊĠĠĠĠĠ ĠassertThat < Int >( response . next D nd Start Ts , Ġ` is `( notNull Value ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġrun Ġ{ ĊĠĠĠĠĠ Ġval Ġusers Ġ= Ġmembers !!. map Ġ{ Ġit . id Ġ}. filter NotNull () ĊĠĠĠĠĠ Ġval Ġresponse Ġ= Ġslack . d nd Team Info ( D nd Team Info Request ( token Ġ= Ġtoken , Ġusers Ġ= Ġ( users ))) ĊĠĠĠĠĠ ĠassertThat ( response . ok , Ġ` is `( true )) ĊĠĠĠĠĠ ĠassertThat < Map < String , ĠD nd Team Info Response . D nd Team Member Info >>( response . users , Ġ` is `( notNull Value ())) ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ }