<commit_before>package org.eclipse.scanning.test.event.queues;

import java.net.URI;
import java.net.URISyntaxException;

import org.eclipse.dawnsci.json.MarshallerService;
import org.eclipse.scanning.api.event.queues.IQueueService;
import org.eclipse.scanning.api.event.queues.beans.QueueAtom;
import org.eclipse.scanning.api.event.queues.beans.QueueBean;
import org.eclipse.scanning.event.EventServiceImpl;
import org.eclipse.scanning.event.queues.AtomQueueService;
import org.eclipse.scanning.test.event.queues.mocks.AllBeanQueueProcessCreator;
import org.junit.Before;
import org.junit.BeforeClass;

import uk.ac.diamond.daq.activemq.connector.ActivemqConnectorService;

/**
 * Test of the concrete implementation {@link AtomQueueService} of the {@link IQueueService}.
 * Tests located in {@link AbstractQueueServiceTest}.
 * @author wnm24546
 *
 */
public class AtomQueueServiceDummyTest extends AbstractQueueServiceTest {
	
	@Before
	public void createService() throws Exception {
		//Configure AtomQueueService as necessary before setting the test field
		AtomQueueService localQServ = new AtomQueueService();
		localQServ.setQueueRoot(qRoot);
		localQServ.setURI(uri);
		ActivemqConnectorService.setJsonMarshaller(new MarshallerService());
		localQServ.setEventService(new EventServiceImpl(new ActivemqConnectorService()));
		
		qServ = localQServ;
		
		//Reset the IQueueService generic process creator
		qServ.setJobQueueProcessor(new AllBeanQueueProcessCreator<QueueBean>(true));
		qServ.setActiveQueueProcessor(new AllBeanQueueProcessCreator<QueueAtom>(true));
		
		//All set? Let's go!
		qServ.init();
	}

}
<commit_msg>Change EventService setting to use the QueueServiceHolder and instantiate with a new two argument test constructor.<commit_after>package org.eclipse.scanning.test.event.queues;

import org.eclipse.dawnsci.json.MarshallerService;
import org.eclipse.scanning.api.event.queues.IQueueService;
import org.eclipse.scanning.api.event.queues.beans.QueueAtom;
import org.eclipse.scanning.api.event.queues.beans.QueueBean;
import org.eclipse.scanning.event.EventServiceImpl;
import org.eclipse.scanning.event.queues.AtomQueueService;
import org.eclipse.scanning.event.queues.QueueServicesHolder;
import org.eclipse.scanning.test.event.queues.mocks.AllBeanQueueProcessCreator;
import org.junit.Before;

import uk.ac.diamond.daq.activemq.connector.ActivemqConnectorService;

/**
 * Test of the concrete implementation {@link AtomQueueService} of the {@link IQueueService}.
 * Tests located in {@link AbstractQueueServiceTest}.
 * @author wnm24546
 *
 */
public class AtomQueueServiceDummyTest extends AbstractQueueServiceTest {
	
	@Before
	public void createService() throws Exception {
		//Set up IEventService
		ActivemqConnectorService.setJsonMarshaller(new MarshallerService());
		QueueServicesHolder.setEventService(new EventServiceImpl(new ActivemqConnectorService()));
		
		//Create QueueService with 2 argument constructor for tests
		qServ = new AtomQueueService(qRoot, uri);
		
		//Reset the IQueueService generic process creator
		qServ.setJobQueueProcessor(new AllBeanQueueProcessCreator<QueueBean>(true));
		qServ.setActiveQueueProcessor(new AllBeanQueueProcessCreator<QueueAtom>(true));
		
		//All set? Let's go!
		qServ.init();
	}

}

{'fraction_non_alphanumeric': 0.09510703363914373, 'fraction_numerical': 0.003363914373088685, 'mean_word_length': 6.110869565217391, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6022254', 'n_tokens_mistral': 1015, 'n_tokens_neox': 964, 'n_words': 193}