StompFrameDecoder extends ReplayingDecoder<VoidEnum> { public static String unescapeHeader(String string) { if (string == null) return string; string = string.replace("\\n", "\n"); string = string.replace("\\c", ":"); string = string.replace("\\\\", "\\"); return string; } StompFrameDecoder(); static String unescapeHeader(String string);  }
@Test public void testUnescapeHeader() throws Exception { assertEquals("test\ntest", StompFrameDecoder.unescapeHeader("test\\ntest")); assertEquals("test:test", StompFrameDecoder.unescapeHeader("test\\ctest")); assertEquals("test\\test", StompFrameDecoder.unescapeHeader("test\\\\test")); assertEquals("test:line1\nline2 \\b\\", StompFrameDecoder.unescapeHeader("test\\cline1\\nline2 \\\\b\\\\")); }
@Test public void testUnescapeHeader_null() throws Exception { assertNull(StompFrameDecoder.unescapeHeader(null)); }