AppInfo { public String executeCommands(String commands) { return this.executeCommands(commands, " ,"); } AppInfo(); String executeCommand(String command); String executeCommands(String commands); String executeCommands(String commands, String separator); void setLocation(String location); String getAppVersion(); static Logger getLogger(); String getSpecificationTitle(); String getSpecificationVersion(); String getSpecificationVendor(); String getImplementationTitle(); String getImplementationVersion(); String getImplementationVendor(); void setAppVersion(String appVersion); String toString(); void setProcessable(Processable processable);  }
@Test public void executeCommands() { AppInfo app = new AppInfo(); if (SystemUtil.getOsInfo().isWindows()) { app.setProcessable(new ProcessClosure()); String cmd = "ipconfig,java"; String result = app.executeCommands(cmd); assertTrue(ObjectUtil.isNotEmpty(result)); return; } app.setProcessable(new ShellClosure()); String cmd = "/sbin/ifconfig,java"; String result = app.executeCommands(cmd); assertTrue(ObjectUtil.isNotEmpty(result)); }