public static ArrayList<Rating> getTestSet(String file) {
		ArrayList<Rating> testset = new ArrayList<Rating>();
		InputStream fis = null;
		BufferedReader br;

		try {
			fis = new FileInputStream(file);
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		br = new BufferedReader(new InputStreamReader(fis,
				Charset.forName("UTF-8")));
		try {
			String line;
			while ((line = br.readLine()) != null) {
				// Deal with the line
				String fields[] = line.split(",");
				Rating r = new Rating();
				r.user = Long.parseLong(fields[0]);
				r.item = Long.parseLong(fields[1]);
				r.rating = Float.parseFloat(fields[2]);

				testset.add(r);
			}
			br.close();
			fis.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		return testset;
	}