### Question:
EntityManagerProducer { @Produces @RequestScoped public EntityManager createEntityManager() { return entityManagerFactory.createEntityManager(); }  @Produces @RequestScoped EntityManager createEntityManager(); void close(@Disposes final EntityManager entityManager);  }### Answer:
@Test public void createEntityManager() { Mockito.when(producer.createEntityManager()).thenReturn(entityManager); assertThat(producer.createEntityManager()).isEqualTo(entityManager); }