@SuppressWarnings("resource")
	public int getTestName(DataSource ds) {
		int type_id = 0;
		while (true) {
			try {
				System.out.print("Back = 0. Enter test name: ");
				Scanner s = new Scanner(System.in);
				String test_name = s.nextLine();
				if (test_name.equals("0")) {
					return 0;
				}
				int test_id = ds.checkTestByName(test_name);
				if (test_id == 0) {
					System.out.println(test_name + " does not exist.");
					continue;
				} else {
					type_id = test_id;
				}
				return type_id;
			} catch (Exception e) {
				System.out.println("Wrong input. Please enter number.");
				continue;
			}
		}
	}