nerdexam
Broadcom-VMware

2V0-72.22PSE · Question #12

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

The correct answer is B. If an embedded database is on the classpath, it will be used to configure a DataSource by D. It auto-configures a TestEntityManager bean. boot/docs/current/api/org/springframework/boot/test/autoconfigure/orm/jpa/DataJpaTest.html

Testing

Question

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

Options

  • ATestEntityManager provides all methods that are provided by EntityManager and more.
  • BIf an embedded database is on the classpath, it will be used to configure a DataSource by
  • CIt can be used for testing both JPA components and NoSQL components.
  • DIt auto-configures a TestEntityManager bean.
  • EIt can be used for testing JdbcTemplate.

How the community answered

(49 responses)
  • A
    4% (2)
  • B
    84% (41)
  • C
    10% (5)
  • E
    2% (1)

Explanation

boot/docs/current/api/org/springframework/boot/test/autoconfigure/orm/jpa/DataJpaTest.html

Topics

#@DataJpaTest#TestEntityManager#JPA testing#embedded database

Community Discussion

No community discussion yet for this question.

Full 2V0-72.22PSE Practice