package Ġcom . episode 6 . hack it . mock sp ress o . mockito . integration Ċ Ċ import Ġcom . episode 6 . hack it . mock sp ress o . Build Mock sp ress o Ċ import Ġcom . episode 6 . hack it . mock sp ress o . annotation . Dependency Ċ import Ġcom . episode 6 . hack it . mock sp ress o . annotation . Real Object Ċ import Ġcom . episode 6 . hack it . mock sp ress o . basic . plugin . inject By Simple Config Ċ import Ġcom . episode 6 . hack it . mock sp ress o . mockito . Conditions . mock Condition Ċ import Ġcom . episode 6 . hack it . mock sp ress o . mockito . mock By Mockito Ċ import Ġcom . episode 6 . hack it . mock sp ress o . testing . matches Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . mock Ċ import Ġorg . fest . assertions . api . Assertions . assertThat Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġorg . mockito . Mock Ċ import Ġjavax . inject . Named Ċ Ċ /** Ċ Ġ* ĠTest Ġmock ing Ġusing Ġkotlin Ġext Ġmethods Ċ Ġ*/ Ċ class ĠMockito Kotlin Mock ing Test Ġ{ ĊĊĠ Ġprivate Ġinterface ĠTest Dep 1 ĊĠ Ġprivate Ġinterface ĠTest Dep 2 ĊĠ Ġprivate Ġinterface ĠTest Dep 3 ĊĠ Ġprivate Ġclass ĠTest Obj ( ĊĠĠĠĠĠ Ġval Ġdep 1 : ĠTest Dep 1 , ĊĠĠĠĠĠ Ġ@ Named (" dep 2 ") Ġval Ġdep 2 : ĠTest Dep 2 , ĊĠĠĠĠĠ Ġval Ġdep 3 : ĠTest Dep 3 ) ĊĊĠ Ġ@ get : Rule Ġval Ġmock sp ress o Ġ= ĠBuild Mock sp ress o . with () ĊĠĠĠĠĠ Ġ. inject By Simple Config () ĊĠĠĠĠĠ Ġ. mock By Mockito () ĊĠĠĠĠĠ Ġ. build Rule () ĊĊĠ Ġ@ Mock Ġprivate Ġlateinit Ġvar Ġdep 1 : ĠTest Dep 1 ĊĠ Ġ@ Dependency Ġ@ field : Named (" dep 2 ") Ġprivate Ġval Ġdep 2 : ĠTest Dep 2 Ġ= Ġmock () ĊĊĠ Ġ@ Real Object Ġprivate Ġlateinit Ġvar Ġtest Obj : ĠTest Obj ĊĊĠ Ġ@ Test Ġfun Ġassert Deps Are Mocks () Ġ{ ĊĠĠĠ ĠassertThat ( test Obj . dep 1 ). isEqualTo ( dep 1 ). matches ( mock Condition ()) ĊĠĠĠ ĠassertThat ( test Obj . dep 2 ). isEqualTo ( dep 2 ). matches ( mock Condition ()) ĊĠĠĠ ĠassertThat ( test Obj . dep 3 ). matches ( mock Condition ()) ĊĠ Ġ} Ċ } Ċ