void () { String commandOnly = """ PID PPID STAT USER COMM 1 0 S user /dir/file"""; String full = """ PID PPID STAT USER COMMAND 1 0 S user /dir/file"""; List<ProcessInfo> infos = ProcessListUtil.parseMacOutput(commandOnly, full, null); assertOrderedEquals(infos, new ProcessInfo(1, "/dir/file", "file", "", "/dir/file", 0, "user", ThreeState.UNSURE)); infos = ProcessListUtil.parseMacOutput(commandOnly, full, "user"); assertOrderedEquals(infos, new ProcessInfo(1, "/dir/file", "file", "", "/dir/file", 0, "user", ThreeState.YES)); infos = ProcessListUtil.parseMacOutput(commandOnly, full, "user2"); assertOrderedEquals(infos, new ProcessInfo(1, "/dir/file", "file", "", "/dir/file", 0, "user", ThreeState.NO)); }