VMware vRealize Automation 8.x (2022) — Question 28

Which two statements are true regarding @DataJpaTest? (Choose two.)

Answer options

Correct answer: B, D

Explanation

The correct answers are B and D because @DataJpaTest automatically configures a DataSource if an embedded database is present, and it also auto-configures a TestEntityManager bean for testing purposes. Options A and C are incorrect as TestEntityManager does not provide more methods than EntityManager, and @DataJpaTest is specifically designed for JPA components, not NoSQL. Option E is also incorrect as JdbcTemplate is not the focus of @DataJpaTest.