E is wrong because for testing JdbcTemplate is a dedicated slice named @DataJdbcTest (reference https://docs.spring.io/spring-boot/appendix/test-auto-configuration/slices.html)
A is correct as well as D, why A? here is the reason, TestEntityManager extends EntityManager which means it inherits all methods of EntityManager and adds more specialized methods specifically for testing purposes.
A is incorrect because TestEntityManager does not provide all methods that are provided by EntityManager. It only provides a subset of the methods that are relevant for testing.
C is incorrect because @DataJpaTest is specifically designed for testing JPA components. It cannot be used for testing NoSQL components.
E is incorrect because @DataJpaTest cannot be used for testing JdbcTemplate. JdbcTemplate is a different type of data access abstraction that is not related to JPA.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
sonmar
3 months, 4 weeks ago2211094
11 months, 1 week agoTolo01
1 year, 9 months agorhuanca
2 years, 1 month ago