@Test public void sanitiseRemovesNewlines() throws Exception { assertThat(Logging.sanitise("first line\nsecond line"), is("first line\\nsecond line")); }
public static String sanitise(String input) { return input.replaceAll("\\n", "\\\\n"); }
Logging { public static String sanitise(String input) { return input.replaceAll("\\n", "\\\\n"); } }
Logging { public static String sanitise(String input) { return input.replaceAll("\\n", "\\\\n"); } private  Logging(); }
Logging { public static String sanitise(String input) { return input.replaceAll("\\n", "\\\\n"); } private  Logging(); static String sanitise(String input); }
Logging { public static String sanitise(String input) { return input.replaceAll("\\n", "\\\\n"); } private  Logging(); static String sanitise(String input);  }