### Question:
ShellExecutor extends AbstractShell { public static String execCommand(String... cmd) throws IOException { return execCommand(null, cmd, 0L); } ShellExecutor(String... execString);  ShellExecutor(String[] execString, File dir);  ShellExecutor(String[] execString, File dir,
                                Map<String, String> env);  ShellExecutor(String[] execString, File dir,
                                Map<String, String> env, long timeout); static String execCommand(String... cmd); static String execCommand(Map<String, String> env, String[] cmd,
                                     long timeout); static String execCommand(Map<String,String> env, String ... cmd); void execute(); String getOutput(); @Override String toString();  }### Answer:
@Test public void execCommand() throws InterruptedException { try { String res = ShellExecutor.execCommand("groups"); logger.info("thread id:" + Thread.currentThread().getId() + ", result:" + res.substring(0, 5)); } catch (Exception e) { e.printStackTrace(); } }