### Question:
EntityManagerProducer { public void close(@Disposes final EntityManager entityManager) { entityManager.close(); }  @Produces @RequestScoped EntityManager createEntityManager(); void close(@Disposes final EntityManager entityManager);  }### Answer:
@Test public void close() { producer.close(entityManager); Mockito.verify(entityManager).close(); }