Put@Transactionalon your test class or methods and test-managed transactions willautomatically be rollbacked. Table of Contents The Antipattern Difference Between Test-, Spring- and Application-ManagedTransactions What Does @Transactional Do? Beware: Only Test-Managed Transactions Are RolledBack Set Up or Tear Down Outside of aTransaction Spring Boot Version The Antipattern When looking at system test in Spring, it is not uncommon to see thispattern: importorg.junit.jupiter.api.Assertions.ass...