HibernateEntityPackageManager packageManager = newMock(HibernateEntityPackageManager.class);
expect(packageManager.getPackageNames()).andReturn(packageNames);
List<HibernateConfigurer> filters = Arrays.asList(
new DefaultHibernateConfigurer(),
new PackageNameHibernateConfigurer(packageManager, new ClassNameLocatorImpl()));
replay();
HibernateSessionSource source = new HibernateSessionSourceImpl(_log, filters);
Session session = source.create();