package Ġcom . vl ad 1 m 1 r . bl tax i . about . data Ċ Ċ import Ġcom . n ha ar man . mock it ok otlin 2 .* Ċ import Ġcom . vl ad 1 m 1 r . bl tax i . about . domain . Action Ċ import Ġorg . junit . Test Ċ Ċ class ĠAction Executor Impl Should Ġ{ ĊĊĠĠĠ Ġprivate Ġval ĠstartActivity Ġ= Ġmock < Start Activity >() ĊĠĠĠ Ġprivate Ġval Ġshare Executor Ġ= Ġmock < Share Executor > Ġ{ ĊĠĠĠĠĠĠĠ Ġon Ġ{ Ġcan Handle Action ( any ()) Ġ}. then Call Real Method () ĊĠĠĠ Ġ} ĊĠĠĠ Ġprivate Ġval Ġsend Email Executor Ġ= Ġmock < Send Email Executor >{ ĊĠĠĠĠĠĠĠ Ġon Ġ{ Ġcan Handle Action ( any ()) Ġ}. then Call Real Method () ĊĠĠĠ Ġ} ĊĠĠĠ Ġprivate Ġval Ġopen Play Store Executor Ġ= Ġmock < Open Play Store Executor >{ ĊĠĠĠĠĠĠĠ Ġon Ġ{ Ġcan Handle Action ( any ()) Ġ}. then Call Real Method () ĊĠĠĠ Ġ} ĊĠĠĠ Ġprivate Ġval Ġopen Url Executor Ġ= Ġmock < Open Url Executor >{ ĊĠĠĠĠĠĠĠ Ġon Ġ{ Ġcan Handle Action ( any ()) Ġ}. then Call Real Method () ĊĠĠĠ Ġ} ĊĠĠĠ Ġprivate Ġval Ġcall Number Executor Ġ= Ġmock < Call Number Executor >{ ĊĠĠĠĠĠĠĠ Ġon Ġ{ Ġcan Handle Action ( any ()) Ġ}. then Call Real Method () ĊĠĠĠ Ġ} ĊĠĠĠ Ġprivate Ġval Ġcall Number On Vi ber Executor Ġ= Ġmock < Call Number On Vi ber Executor >{ ĊĠĠĠĠĠĠĠ Ġon Ġ{ Ġcan Handle Action ( any ()) Ġ}. then Call Real Method () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġval Ġaction Executor Impl Ġ= ĠAction Executor Impl ( ĊĠĠĠĠĠĠĠ ĠstartActivity , ĊĠĠĠĠĠĠĠ Ġshare Executor , ĊĠĠĠĠĠĠĠ Ġsend Email Executor , ĊĠĠĠĠĠĠĠ Ġopen Play Store Executor , ĊĠĠĠĠĠĠĠ Ġopen Url Executor , ĊĠĠĠĠĠĠĠ Ġcall Number Executor , ĊĠĠĠĠĠĠĠ Ġcall Number On Vi ber Executor ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcall Share Executor _ when Share Action () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġaction Ġ= ĠAction . Share Action (" url ") ĊĊĠĠĠĠĠĠĠ Ġaction Executor Impl . execute ( action ) ĊĊĠĠĠĠĠĠĠ Ġverify ( share Executor ). invoke ( action ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcall Send Email Executor _ when Send Email Action () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġaction Ġ= ĠAction . Send Email Action (" email ") ĊĊĠĠĠĠĠĠĠ Ġaction Executor Impl . execute ( action ) ĊĊĠĠĠĠĠĠĠ Ġverify ( send Email Executor ). invoke ( action ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcall Open Play Store Executor _ when Open Play Store Action () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġaction Ġ= ĠAction . Open Play Store Action (" application _ id ") ĊĊĠĠĠĠĠĠĠ Ġaction Executor Impl . execute ( action ) ĊĊĠĠĠĠĠĠĠ Ġverify ( open Play Store Executor ). invoke ( action ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcall Open Url Executor _ when Open Url Action () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġaction Ġ= ĠAction . Open Url Action (" url ") ĊĊĠĠĠĠĠĠĠ Ġaction Executor Impl . execute ( action ) ĊĊĠĠĠĠĠĠĠ Ġverify ( open Url Executor ). invoke ( action ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcall Call Number Executor _ when Call Number Action () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġaction Ġ= ĠAction . Call Number Action (" phone _ number ") ĊĊĠĠĠĠĠĠĠ Ġaction Executor Impl . execute ( action ) ĊĊĠĠĠĠĠĠĠ Ġverify ( call Number Executor ). invoke ( action ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġcall Call Number On Vi ber Executor _ when Call Number On Vi ber Action () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġaction Ġ= ĠAction . Call Number On Vi ber Action (" phone _ number ") ĊĊĠĠĠĠĠĠĠ Ġaction Executor Impl . execute ( action ) ĊĊĠĠĠĠĠĠĠ Ġverify ( call Number On Vi ber Executor ). invoke ( action ) ĊĠĠĠ Ġ} Ċ } Ċ