package Ġcom . kotlin . res ili ency Ċ Ċ import Ġcom . github . tom ake hur st . wire mock . Wire Mock Server Ċ import Ġorg . springframework . boot . test . context . Test Configuration Ċ import Ġorg . springframework . boot . web . client . Rest Template Builder Ċ import Ġorg . springframework . context . annotation . Bean Ċ import Ġorg . springframework . context . annotation . Primary Ċ import Ġorg . springframework . context . annotation . Scope Ċ import Ġorg . springframework . web . client . Rest Operations Ċ import Ġorg . springframework . web . client . Rest Template Ċ import Ġorg . springframework . web . util . Default Uri BuilderFactory Ċ Ċ @ Test Configuration Ċ class ĠRes ili ency Application Tests Configuration Ġ{ ĊĊ ĉ @ Bean Ċ ĉ @ Scope (" singleton ") Ċ ĉ fun Ġwire Mock Server (): ĠWire Mock Server Ġ{ Ċĉ ĉ return ĠWire Mock Server ( 9 0 8 7 ). also { Ċĉĉ ĉ it . start () Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ @ Bean Ċ ĉ @ Primary Ċ ĉ fun Ġrest Operations ( wire Mock Server : ĠWire Mock Server ) Ġ: ĠRest Operations Ġ{ Ċĉ ĉ val Ġfactory Ġ= ĠDefault Uri BuilderFactory ( wire Mock Server . baseUrl ()) Ċĉ ĉ return ĠRest Template (). also Ġ{ Ċĉĉ ĉ it . uri Template Handler Ġ= Ġfactory Ċĉ ĉ } Ċ ĉ } Ċ }