public static List<ProcessInformations> buildProcessInformations(InputStream in,
			boolean windows, boolean macOrAix) {
		final String charset;
		if (windows) {
			charset = "Cp1252";
		} else {
			charset = "UTF-8";
		}
		final Scanner sc = new Scanner(in, charset);
		sc.useRadix(10);
		sc.useLocale(Locale.US);
		sc.nextLine();
		if (windows) {
			sc.nextLine();
			sc.nextLine();
		}

		final List<ProcessInformations> processInfos = new ArrayList<>();
		while (sc.hasNext()) {
			final ProcessInformations processInfo = new ProcessInformations(sc, windows, macOrAix);
			processInfos.add(processInfo);
		}
		return Collections.unmodifiableList(processInfos);
	}
@Test
	public void testReadPs() {
		final List<ProcessInformations> processInformations = ProcessInformations
				.buildProcessInformations(getClass().getResourceAsStream("/tasklist.txt"), true,
						false);
		assertSame("processes", processInformations.size(), 49);
		checkProcesses(processInformations, true);
		final List<ProcessInformations> processInformations2 = ProcessInformations
				.buildProcessInformations(getClass().getResourceAsStream("/ps.txt"), false, false);
		assertSame("processes", processInformations2.size(), 118);
		checkProcesses(processInformations2, false);
		final List<ProcessInformations> processInformations3 = ProcessInformations
				.buildProcessInformations(getClass().getResourceAsStream("/ps_aix.txt"), false,
						true);
		assertSame("processes", processInformations3.size(), 15);
		checkProcesses(processInformations3, false);
	}