DataGenerator { public Collection<String> generateCategoryNames(int categoryCount) { ArrayList<String> categories = new ArrayList<String>(); for (int i = 0; i < categoryCount; i++) { categories.add("Category-" + i); } return categories; } private  DataGenerator(); TroiaObjectCollection generateTestObjects(int objectCount,
			Map<String, Double> categories); TroiaObjectCollection generateTestObjects(int objectCount,
			int categoryCount); TroiaObjectCollection generateTestObjects(int objectCount,
			Collection<String> categoryNames); Collection<String> generateCategoryNames(int categoryCount); ArtificialWorker generateArtificialWorker(String name,
			double quality, Collection<String> categories); ArtificialWorker generateArtificialWorker(String name,
			Collection<String> categories); Collection<ArtificialWorker> generateArtificialWorkers(
		int workerCount, Collection<String> categories, double minQuality,
		double maxQuality); Collection<AssignedLabel<String>> generateLabels(Collection<ArtificialWorker> workers, TroiaObjectCollection objects, int workersPerObject); Collection<LObject<String>> generateGoldLabels(
		TroiaObjectCollection objects, double goldCoverage); Collection<Map<String, Object>> computeArtificialWorkerQualities(
			Collection<String> categories,
			TroiaObjectCollection objects,
			Collection<ArtificialWorker> workers,
			Collection<AssignedLabel<String>> labels,
			Collection<LObject<String>> goldLabels); Data generateTestData(String requestId, int objectCount,
			int categoryCount, int workerCount, double minQuality,
			double maxQuality, double goldRatio, int workersPerObject); static DataGenerator getInstance(); final static double CONFUSION_VECTOR_SUM_EPSILON; }
@Test public void testGenerateCategoryNames() { final int categoriesCount = 100; final Pattern pattern = Pattern.compile("^Category-\\d+$"); DataGenerator generator = DataGenerator.getInstance(); Collection<String> names = generator.generateCategoryNames(categoriesCount); for (String name : names) { assertTrue(pattern.matcher(name).matches()); } }