### Question:
ProcFSUtils { public static int[] getChildrenPids(int rootPid) throws IOException { String output = OSUtils.exec(new String[]{"ps", "-o pid --no-headers --ppid " + String.valueOf(rootPid)}); return parsePidsOutput(rootPid, output); }  static boolean isAvailable(); static int[] getChildrenPids(int rootPid); static ProcPidStat stat(int pid); static ProcPidStat[] stat(int[] pids); static ProcStat stat(); static ProcPidIO io(int pid); static ProcPidIO[] io(int[] pids); static ProcNetIO netio(); static ProcSmaps[] smaps(int[] pids); static ProcSmaps[] smaps(int pid); static final String READ_ONLY_WITH_SHARED_PERMISSION; static final String READ_EXECUTE_WITH_SHARED_PERMISSION; }### Answer:
@Test public void getChildrenPids() throws Exception { String output = " 3138\n 3148\n"; int[] pids = ProcFSUtils.parsePidsOutput(1234, output); assertEquals(3, pids.length); assertEquals(1234, pids[0]); assertEquals(3138, pids[1]); assertEquals(3148, pids[2]); }