### Question:
SahiScript { String extractBrowserJS(String s, boolean addLineNumberInfo) { StringBuffer sb = new StringBuffer(s); int startIx = 0; while (startIx != -1) { int endIx = s.indexOf("<browser>", startIx); if (endIx == -1) endIx = s.length(); else endIx = endIx + 9; String nonBrowserJSSnippet = s.substring(startIx, endIx); nonBrowserJSSnippet = nonBrowserJSSnippet.replaceAll("[^\\n]", " "); sb.replace(startIx, endIx, nonBrowserJSSnippet); startIx = s.indexOf("</browser>", endIx); } String js = sb.toString(); if (!addLineNumberInfo) { return stripBlankLines(js); } else return LogViewer.addLineNumbers(js, filePath); } 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 testExtractBrowserJS() { assertEquals(" alert(123);\n print('abc');\n", testScript.extractBrowserJS("a <browser>\n alert(123);\n</browser>\nb\n<browser>\n print('abc');\n</browser>\nc\n", false)); }