InterpreterLauncher { public static String escapeSpecialCharacter(String command) { StringBuilder builder = new StringBuilder(); for (char c : command.toCharArray()) { if (SPECIAL_CHARACTER.indexOf(c) != -1) { builder.append("\\"); } builder.append(c); } return builder.toString(); } InterpreterLauncher(ZeppelinConfiguration zConf, RecoveryStorage recoveryStorage); void setProperties(Properties props); static String escapeSpecialCharacter(String command); InterpreterClient launch(InterpreterLaunchContext context); abstract InterpreterClient launchDirectly(InterpreterLaunchContext context);  }
@Test public void testEscapeSpecialCharacters() { String cmd = "{}."; assertEquals("\\{\\}\\.", InterpreterLauncher.escapeSpecialCharacter(cmd)); }