### Question:
SahiScript { public String modifyCondition(String s, int lineNumber) { if (s.indexOf("_condition") == -1) { return modifyLine(s); } String condition = findCondition(s); if (condition == null) { return modifyLine(s); } StringBuffer sb = new StringBuffer(); String prefix = s.substring(0, s.indexOf(condition)); String suffix = s.substring(s.indexOf(condition) + condition.length()); sb.append(prefix); String separated = "\"" + separateVariables(condition) + "\""; sb.append(separated); logger.debug(separated); sb.append(", \"" + getDebugInfo(lineNumber) + "\""); sb.append(suffix); return modifyFunctionNames(sb.toString()); } 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 testModifyConditionWithTwo$Vars() throws Exception { assertEquals("if (_sahi._condition(\"\"+s_v($a)+\"==\"+s_v($b)+\"\", \"scrName&n=0\"))", testScript.modifyCondition("if (_condition($a==$b))", 0)); }
@Test public void testModifyCondition() throws Exception { assertEquals("if (_sahi._condition(\"a==b\", \"scrName&n=0\"))", testScript.modifyCondition("if (_condition(a==b))", 0)); assertEquals("if (_sahi._condition(\"\"+s_v($i)+\"==10\", \"scrName&n=0\"))", testScript.modifyCondition("if (_condition($i==10))", 0)); assertEquals("if (_sahi._condition(\"\"+s_v($x[$i])+\"==10\", \"scrName&n=0\"))", testScript.modifyCondition("if (_condition($x[$i]==10))", 0)); assertEquals("if (_sahi._condition(\"_sahi._link('a').href == \\\"abcd\\\"\", \"scrName&n=0\"))", testScript.modifyCondition("if (_condition(_link('a').href == \"abcd\"))", 0)); }