package Ġdev . sk zr . lib . dependency Ċ Ċ import Ġdev . sk zr . lib . dependency . repository . Maven Repository Ċ import Ġdev . sk zr . lib . dependency . repository . Repository Config Ċ import Ġdev . sk zr . lib . dependency . tree . Dependency Tree Ċ import Ġorg . junit . jupiter . api . Assertions Ċ import Ġorg . junit . jupiter . api . Test Ċ Ċ internal Ġclass ĠDependency Tree Test Ġ{ Ċ ĉ @ Test Ċ ĉ fun Ġlocate Dependency () Ġ{ Ċĉ ĉ // Ġcreate Ġdep Ġtree Ċĉ ĉ val Ġrepository Config Ġ= ĠRepository Config () Ċĉ ĉ repository Config . add Repository ( Maven Repository (" https :// repo 1 . maven . org / maven 2 ")) Ċĉ ĉ val Ġbuilder Ġ= ĠDependencies () Ċĉĉ ĉ . use Repository Config ( repository Config ) Ċĉ ĉ val Ġdependency Tree Ġ= ĠDependency Tree ( builder ) Ċĉ ĉ // Ġadd Ġroot - level Ġdependencies Ċĉ ĉ dependency Tree . add Dependency ( Ċĉĉ ĉ Dependency (" com . squareup . okhttp 3 : okhttp : 5 . 0 . 0 - alpha . 2 "), Ċĉ ĉ ) Ċĉ ĉ // Ġresolve Ġentire Ġdependency Ġtree Ċĉ ĉ dependency Tree . resolve Dependencies () Ċĉ ĉ // Ġlocate Ġthe Ġtarget Ġdependency Ċĉ ĉ // Ġtop - level Ċĉ ĉ Assertions . assertNotNull ( dependency Tree . locate Dependency (" com . squareup . okhttp 3 : okhttp : 5 . 0 . 0 - alpha . 2 ")) Ċĉ ĉ // Ġ 2 nd Ġlevel Ċĉ ĉ Assertions . assertNotNull ( dependency Tree . locate Dependency (" org . jetbrains . kotlin : kotlin - stdlib : 1 . 4 . 1 0 ")) Ċĉ ĉ // Ġ 3 rd Ġlevel Ċĉ ĉ Assertions . assertNotNull ( dependency Tree . locate Dependency (" org . jetbrains . kotlin : kotlin - stdlib - common : 1 . 4 . 1 0 ")) Ċ ĉ } Ċ } Ċ