I have the following property list in my application.yml
:
foo:
bar:
-
id: baz
item: value
// ...
Then I want to overwrite item
value in tests using @DynamicPropertySource
:
@DynamicPropertySource
@JvmStatic
@Suppress("unused")
fun setupProperties(registry: DynamicPropertyRegistry) {
registry.add("foo.bar[0].item") { "new value" }
}
But during the tests, I got all other properties set to nulls, with one element in bar
array.
I guess that I'm not referring correctly to map entry in yaml
file.
I wonder how I can do that?