Tick { public static String toQuote(String message) { message = Tick.standaloneTick.matcher(message).replaceAll("\""); message = Tick.twoTicks.matcher(message).replaceAll("'"); return message; }  static String toQuote(String message);  }
@Test public void testTicksToQuotesGetsSingleTicks() { Assert.assertEquals("i said \"hi\" then", Tick.toQuote("i said 'hi' then")); }
@Test public void testTicksToQuotesMissesDoubleTicks() { Assert.assertEquals("i said 'hi' then", Tick.toQuote("i said ''hi'' then")); }