public static List<TestData> loadData(final String componentName) {
		List<TestData> result = new ArrayList<TestData>();
		File componentDir = new File("res/testdata/" + componentName);
		if (!componentDir.exists() || !componentDir.isDirectory()) {
			throw new IllegalArgumentException("Test directory does not exist or is invalid");
		}
		List<File> testCandidates = traversePath(componentDir);
		for (File in : testCandidates) {
			if (in.getName().endsWith(".in")) {
				File out = new File(in.getPath().replace(".in", ".out"));
				try {
					List<String> linesIn = new LinkedList<String>();
					BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(new File(
							in.getPath()))));
					String currentLine;
					while ((currentLine = reader.readLine()) != null) {
						linesIn.add(currentLine);
					}
					reader.close();

					List<String> linesOut = new LinkedList<String>();
					reader = new BufferedReader(new InputStreamReader(new FileInputStream(new File(out.getPath()))));
					while ((currentLine = reader.readLine()) != null) {
						linesOut.add(currentLine);
					}
					reader.close();
					TestData t;
					t = new TestData(linesIn, linesOut);
					result.add(t);
				} catch (IOException e) {
					System.err.println("error loading test data for " + componentName);
					e.printStackTrace();
				}
			}
		}

		return result;
	}