public void registerTests(Collection<Test> tests) {
		// Need to copy collection, might be immutable.
		final Set<Test> newTests = new HashSet<Test>(tests);

		final Test[] testArray;

		synchronized (m_tests) {
			newTests.removeAll(m_tests);

			if (newTests.size() == 0) {
				// No new tests.
				return;
			}

			m_tests.addAll(newTests);

			// Create an index of m_tests sorted by test number.
			testArray = m_tests.toArray(new Test[m_tests.size()]);
		}

		final SampleAccumulator[] accumulatorArray = new SampleAccumulator[testArray.length];

		synchronized (m_accumulators) {
			for (Test test : newTests) {
				m_accumulators.put(
								test,
								new SampleAccumulator(m_peakTPSExpression, m_periodIndex, m_statisticsServices
												.getStatisticsSetFactory()));
			}

			for (int i = 0; i < accumulatorArray.length; i++) {
				accumulatorArray[i] = m_accumulators.get(testArray[i]);
			}
		}

		final ModelTestIndex modelTestIndex = new ModelTestIndex(testArray, accumulatorArray);
		this.modelTestIndex = modelTestIndex;
		m_listeners.apply(new ListenerSupport.Informer<Listener>() {
			public void inform(Listener l) {
				l.newTests(newTests, modelTestIndex);
			}
		});
	}
Register new tests.

@param tests	The new tests.
ngrinder-core/src/main/java/net/grinder/console/model/SampleModelImplementationEx.java