### Question:
SahiScript { String modifyWait(String line, int lineNumber) { int comma = line.indexOf(","); if (comma == -1) { return convertToExecuteWait(scheduleLine(line, lineNumber)); } StringBuffer sb = new StringBuffer(); sb.append(line.substring(0, comma)); sb.append(", "); int close = line.lastIndexOf(")"); if (close == -1) { close = line.length(); } sb.append(line.substring(comma + 1, close).trim()); sb.append(");"); return convertToExecuteWait(scheduleLine(sb.toString(), lineNumber)); } SahiScript(String filePath, ArrayList<String> parents, String scriptName); String jsString(); String modifiedScript(); String getDebugInfo(int lineNumber); String getLineDebugInfo(int lineNumber); static boolean lineStartsWithActionKeyword(String line); static String modifySingleLine(String line); static String modifyFunctionNames(String unmodified); static String stripSahiFromFunctionNames(String unmodified); static ArrayList<String> getActionKeyWords(); static ArrayList<String> getKeyWords(); String modifyCondition(String s, int lineNumber); String getScriptName(); String getOriginal(); String getOriginalInHTML(); String getFilePath(); String getBrowserJS(); void addIncludeInfo(SahiScript included); String getBrowserJSWithLineNumbers();  }### Answer:
@Test public void testWait() { assertEquals("_sahi.executeWait(\"_sahi._wait(1000)\", \"scrName&n=5\");\r\n", testScript.modifyWait("_wait(1000)", 5)); assertEquals("_sahi.executeWait(\"_sahi._wait(1000, _sahi._byId(\\\"abc\\\"));\", \"scrName&n=5\");\r\n", testScript.modifyWait("_wait(1000, _byId(\"abc\"))", 5)); assertEquals("_sahi.executeWait(\"_sahi._wait(1000, \"+s_v($BYID_ABC)+\");\", \"scrName&n=5\");\r\n", testScript.modifyWait("_wait(1000, $BYID_ABC)", 5)); assertEquals("_sahi.executeWait(\"_sahi._wait(1000, _sahi._exists(\"+s_v($BYID_ABC)+\"));\", \"scrName&n=5\");\r\n", testScript.modifyWait("_wait(1000, _exists($BYID_ABC))", 5)); }