hibernateConfiguration.addAnnotatedClass( Foo.class );
Properties properties = new Properties();
properties.setProperty( "hibernate.search.default.directory_provider", "ram" );
hibernateConfiguration.getProperties().putAll( properties );
ServiceRegistryBuilder registryBuilder = new ServiceRegistryBuilder();
registryBuilder.applySettings( hibernateConfiguration.getProperties() );
ServiceRegistry serviceRegistry = ServiceRegistryTools.build( registryBuilder );
try {
hibernateConfiguration.buildSessionFactory( serviceRegistry );
fail( "ByteMan should have forced an exception" );