Currently, we are using real MongoDB server for integration testing and it's connection configurations are defined in .yml file as follows:
mongodb:
replica_set: ip/port,ip/port
dbname: mydb
username: abc
password: abc@123
Now we want to use below dependency for embedded MongoDB to mock MongoDB to perform integration testing.
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
<version>1.50.5</version>
</dependency>
How to define embedded MongoDB connection configurations in .yml file? Any help is really appreciated.