package Ġcom . n ugu . sdk . agent . playback control Ċ Ċ import Ġcom . n ha ar man . mockito _ kotlin . any Ċ import Ġcom . n ha ar man . mockito _ kotlin . mock Ċ import Ġcom . n ha ar man . mockito _ kotlin . verify Ċ import Ġcom . n ha ar man . mockito _ kotlin . wh enever Ċ import Ġcom . sk t . n ugu . sdk . agent . playback . Playback Button Ċ import Ġcom . sk t . n ugu . sdk . agent . playback . impl . Playback Controller Ċ import Ġcom . sk t . n ugu . sdk . core . interfaces . context . Context Manager Interface Ċ import Ġcom . sk t . n ugu . sdk . core . interfaces . message . Message Sender Ċ import Ġorg . junit . Test Ċ Ċ class ĠPlay back Controller Test Ġ{ ĊĠĠĠ Ġprivate Ġval Ġmock Context Manager : ĠContext Manager Interface Ġ= Ġmock () ĊĠĠĠ Ġprivate Ġval Ġmock Message Sender : ĠMessage Sender Ġ= Ġmock () ĊĊĠĠĠ Ġprivate Ġval Ġplayback Controller : ĠPlay back Controller Ġ= ĊĠĠĠĠĠĠĠ ĠPlay back Controller ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmock Context Manager , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmock Message Sender ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġplay Button Pressed () Ġ{ ĊĠĠĠĠĠĠĠ Ġwhenever ( mock Context Manager . getContext ( playback Controller )). then Ġ{ Ġplayback Controller . on Context Available ("{} ") Ġ} ĊĠĠĠĠĠĠĠ Ġplayback Controller . on Button Pressed ( Playback Button . PLAY ) ĊĠĠĠĠĠĠĠ Ġverify ( mock Context Manager ). getContext ( playback Controller ) ĊĠĠĠĠĠĠĠ Ġverify ( mock Message Sender ). new Call ( any ()) ĊĠĠĠ Ġ} Ċ }