{
try
{
String baseDn = config.getBaseDn();
SearchRequest searchRequest = new SearchRequestImpl();
searchRequest.setBase( new Dn( baseDn ) );
searchRequest.setFilter( config.getFilter() );
searchRequest.setSizeLimit( config.getSearchSizeLimit() );
searchRequest.setTimeLimit( config.getSearchTimeout() );
searchRequest.setDerefAliases( config.getAliasDerefMode() );
searchRequest.setScope( config.getSearchScope() );
searchRequest.setTypesOnly( false );
searchRequest.addAttributes( config.getAttributes() );
DirectoryService directoryService = new MockDirectoryService();
directoryService.setSchemaManager( schemaManager );
( ( MockSyncReplConsumer ) syncreplClient ).init( directoryService );
syncreplClient.start();