← Quiz: Testing Spring Boot: all 10 questions
Quiz: Testing Spring Boot · Question 4 of 10
What does @DataJpaTest do after each test by default?
What does @DataJpaTest do after each test by default?
- A.Deletes the database file
- B.Rolls back the transaction
- C.Commits all changes
- D.Restarts the application
Answer & explanation
Correct answer: Rolls back the transaction
Each test starts with a clean state.
Can you get the rest right without peeking?
Take the timed Quiz: Testing Spring Boot quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →