@Test
public void persistence_unit_name_missing()
{
final VoidService delegate = newMock(VoidService.class);
final EntityManagerManager manager = newMock(EntityManagerManager.class);
final JpaTransactionAdvisor advisor = newJpaTransactionAdvisor(manager);
Map<String, EntityManager> managers = CollectionFactory.newMap();
managers.put("A", newMock(EntityManager.class));
managers.put("B", newMock(EntityManager.class));
final AspectInterceptorBuilder<VoidService> builder = aspectDecorator.createBuilder(
VoidService.class, delegate, "foo.Bar");
advisor.addTransactionCommitAdvice(builder);
final VoidService interceptor = builder.build();
expect(manager.getEntityManagers()).andReturn(managers);
replay();
try
{