### Question:
XSLTHelper { public static String quoteEOLEscapedStringForPython(String value) { if (value == null) { return "None"; } final StringBuilder result = new StringBuilder(); final String quotes = pythonQuotes(value); result.append(quotes).append(escape(value, true)).append(quotes); return result.toString(); } XSLTHelper(); static String formatTime(String iso8601); static String quoteForPython(String value); static String quoteEOLEscapedStringForPython(String value); static String quoteForClojure(String value); static String quoteEOLEscapedStringForClojure(String value); static String summariseAsLine(String value, int maximumCharacters); static String escape(String value); static String indent(); static String newLine(); static String newLineAndIndent(); static String changeIndent(int indentChange); static String resetIndent(); static String base64ToPython(String base64String); static String base64ToClojure(String base64String); static void setIndentString(String indentString);  }### Answer:
@Test public void testQuoteEOLEscapedStringForPython() throws Exception { assertEquals("None", XSLTHelper.quoteEOLEscapedStringForPython(null)); assertEquals("''", XSLTHelper.quoteEOLEscapedStringForPython("")); assertEquals("\'\\\"\'", XSLTHelper.quoteEOLEscapedStringForPython("\"")); assertEquals("'foo'", XSLTHelper.quoteEOLEscapedStringForPython("foo")); assertEquals("'foo\\''", XSLTHelper.quoteEOLEscapedStringForPython("foo'")); assertEquals("' \\\\ '", XSLTHelper.quoteEOLEscapedStringForPython(" \\ ")); assertEquals("'''foo bah'''", XSLTHelper.quoteEOLEscapedStringForPython("foo \n \r bah")); assertEquals("'foo \\n bah\\\\'", XSLTHelper.quoteEOLEscapedStringForPython("foo \\n bah\\")); }