### Question:
ProcessUtils { public static String getPidsStr(int processId) throws Exception { StringBuilder sb = new StringBuilder(); Matcher mat; if (OSUtils.isMacOS()) { String pids = OSUtils.exeCmd("pstree -sp " + processId); mat = MACPATTERN.matcher(pids); } else { String pids = OSUtils.exeCmd("pstree -p " + processId); mat = WINDOWSATTERN.matcher(pids); } while (mat.find()) { sb.append(mat.group(1)).append(" "); } return sb.toString().trim(); }  static String buildCommandStr(List<String> commandList); static void cancelApplication(List<String> appIds, Logger logger, String tenantCode, String executePath); static void kill(TaskExecutionContext taskExecutionContext); static String getPidsStr(int processId); static void killYarnJob(TaskExecutionContext taskExecutionContext);  }### Answer:
@Test public void getPidsStr() throws Exception { String pidList = ProcessUtils.getPidsStr(1); Assert.assertNotEquals("The child process of process 1 should not be empty", pidList, ""); logger.info("Sub process list : {}", pidList); }