While attempting to use the EntityManager to get access to my Hibernate Metamodel, I realized that any time I tried the following, my unit test would get stuck on initialization. The test wouldn't spit out any error logs, but instead would continue to run without end.
@SpringBootTest
class Test {
@Autowired
EntityManager entityManager;
}
Are you not able to inject a real instance of the EntityManager in Test classes? Is there a way to be able to inject this EntityManager?