package Ġcom . pe fd ne ves . my dots . worker Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroidx . work . Worker Parameters Ċ import Ġcom . pe fd ne ves . my dots . domain . repository . SharedPreferences Repository Impl Ċ import Ġcom . pe fd ne ves . my dots . domain . use case . Notification UseCase Impl Ċ import Ġcom . pe fd ne ves . my dots . utils . notification . Dot s Notification ManagerImpl Ċ import Ġio . mock k . mock k Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Test Ċ Ċ class ĠNotification Worker Factory Test Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġmock Notification Manager : ĠD ots Notification ManagerImpl ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġmock Notification UseCase Impl : ĠNotification UseCase Impl ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġmock SharedPreferences Repository : ĠSharedPreferences Repository Impl ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġtest Subject : ĠNotification Worker Factory ĊĊĠĠĠ Ġ@ Before ĊĠĠĠ Ġfun Ġsetup () Ġ{ ĊĠĠĠĠĠĠĠ Ġmock Notification Manager Ġ= Ġmock k () ĊĠĠĠĠĠĠĠ Ġmock Notification UseCase Impl Ġ= Ġmock k () ĊĠĠĠĠĠĠĠ Ġmock SharedPreferences Repository Ġ= Ġmock k () ĊĠĠĠĠĠĠĠ Ġtest Subject Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠNotification Worker Factory ( mock Notification UseCase Impl , Ġmock Notification Manager , Ġmock SharedPreferences Repository ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ create Worker () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmock Context Ġ= Ġmock k < Context >() ĊĠĠĠĠĠĠĠ Ġval Ġfake String Ġ= Ġ" String " ĊĠĠĠĠĠĠĠ Ġval Ġmock Worker Parameters Ġ= Ġmock k < Worker Parameters >() ĊĊĠĠĠĠĠĠĠ Ġval Ġvalue Ġ= Ġtest Subject . create Worker ( mock Context , Ġfake String , Ġmock Worker Parameters ) ĊĊĠĠĠĠĠĠĠ Ġassert ( value Ġis ĠNotification Worker ) ĊĠĠĠ Ġ} Ċ Ċ }