title: How to get persistence unit name from EntityManager
body: <p>Is it possible to get the associated persistence unit name of an EntityManager object? For example, you have </p>
  
  <pre><code>@PersistenceContext( unitName="fooPU" )
  private EntityManager em;
  </code></pre>
  
  <p>Is it possible to get the name <code>fooPU</code> from <code>em</code>? The motivation for this is that I want to have a small test to verify that the injected em through <code>@Inject</code> is associated with the right persistence unit. </p>