Spring Boot - Testing Spring Boot Applications
Consider this test snippet using
@DataJpaTest:
@Test
void testCount() {
long countBefore = repo.count();
repo.save(new User(null, "Alice"));
long countAfter = repo.count();
System.out.println(countAfter - countBefore);
}
What will be printed?