public void testCustomWorkerWithProperties() {
manualConfiguration.addProperty( "hibernate.search.worker.scope", CustomWorkerExpectingFooAndBar.class.getName() );
manualConfiguration.addProperty( "hibernate.search.worker.foo", "foo" );
manualConfiguration.addProperty( "hibernate.search.worker.bar", "bar" );
SearchFactoryImplementor searchFactoryImplementor =
new SearchFactoryBuilder().configuration( manualConfiguration ).buildSearchFactory();
assertNotNull( "Worker should have been created", searchFactoryImplementor.getWorker() );
assertTrue( "Wrong worker class", searchFactoryImplementor.getWorker() instanceof CustomWorkerExpectingFooAndBar );
}