package Ġno . sk at te et aten . aur ora . go bo . integration . db h Ċ Ċ import Ġassert k . assertThat Ċ import Ġassert k . assertions . isNotNull Ċ import Ġassert k . assertions . isNull Ċ import Ġno . sk at te et aten . aur ora . go bo . Requires Db h Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . springframework . beans . factory . annotation . Autowired Ċ import Ġorg . springframework . boot . test . context . SpringBootTest Ċ Ċ @ SpringBootTest ( ĊĠĠĠ Ġclasses Ġ= Ġ[ Requires Db h :: class , ĠDatabase Service Reactive :: class , ĠDatabase Service Disabled :: class ], ĊĠĠĠ Ġproperties Ġ= Ġ[" integrations . db h . url = false "] Ċ ) Ċ class ĠDisable Database Service Test Ġ{ ĊĊĠĠĠ Ġ@ Autowired ( required Ġ= Ġfalse ) ĊĠĠĠ Ġprivate Ġvar Ġdatabase Service : ĠDatabase Service Reactive ? Ġ= Ġnull ĊĊĠĠĠ Ġ@ Autowired ( required Ġ= Ġfalse ) ĊĠĠĠ Ġprivate Ġvar Ġdatabase Service Disabled : ĠDatabase Service Disabled ? Ġ= Ġnull ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` Disable ĠDB H Ġgiven Ġno Ġurl Ġconfigured `() Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat ( database Service ). isNull () ĊĠĠĠĠĠĠĠ ĠassertThat ( database Service Disabled ). isNotNull () ĊĠĠĠ Ġ} Ċ } Ċ