void () { List<ProcessInfo> infos = ProcessListUtil.parseMacOutput( """ PID PPID STAT USER COMM 1 0 S user /dir/file 2 1 S user ./dir/dir/file 3 2 S user ./dir/dir/file 10000 3 S user ./dir/dir/file""", """ PID PPID STAT USER COMMAND 1 0 S user /dir/file 2 1 S user ./dir/dir/file 3 2 S user ./dir/dir/file param param 10000 3 S user ./dir/dir/file param2 param2""" ); assertOrderedEquals(infos, new ProcessInfo(1, "/dir/file", "file", "", "/dir/file", 0, "user", ThreeState.UNSURE), new ProcessInfo(2, "./dir/dir/file", "file", "", "./dir/dir/file", 1, "user", ThreeState.UNSURE), new ProcessInfo(3, "./dir/dir/file param param", "file", "param param", "./dir/dir/file", 2, "user", ThreeState.UNSURE), new ProcessInfo(10000, "./dir/dir/file param2 param2", "file", "param2 param2", "./dir/dir/file", 3, "user", ThreeState.UNSURE)); }