
How to clear database in Spring Boot tests? - BrightDevs
https://brightinventions.pl/blog/clear-database-in-spring-boot-tests/
======
BrightDevs
Nowadays using a production like database in unit1 tests is a common practice.
Calling a real database can increase our confidence that a tested code
actually works. Having said that a database, by its very nature, brings
external state into a test that will affect its behavior, hence we need to pay
special attention to prepare the test execution. There are couple of ways to
handle the database state in tests and I’m going to describe an approach I
like most.

