@Test @DisplayName("handleNormalMultiLineStringCharacter functions as needed") void handleNormalMultiLineStringCharacterWorks() { final StringBuilder sb = new StringBuilder("a\n\r\nb\r\rc\rd"); final StringBuilder output = new StringBuilder(); final StringBuilder original = new StringBuilder(); while (sb.length() > 0) Escape.handleNormalMultiLineStringCharacter(sb, output, original); assertThat(sb.length()).isEqualTo(0); assertThat(output.toString()).isEqualTo("a\n\nb\nc\nd"); assertThat(original.toString()).isEqualTo("a\n\r\nb\r\rc\rd"); }
static void handleNormalMultiLineStringCharacter(StringBuilder sb, StringBuilder output, StringBuilder original) { char ch = sb.charAt(0); if (ch == '\n' || ch == '\r') { normalizedNewLines(sb, output, original); } else { output.append(ch); original.append(ch); sb.deleteCharAt(0); } }
Escape { static void handleNormalMultiLineStringCharacter(StringBuilder sb, StringBuilder output, StringBuilder original) { char ch = sb.charAt(0); if (ch == '\n' || ch == '\r') { normalizedNewLines(sb, output, original); } else { output.append(ch); original.append(ch); sb.deleteCharAt(0); } } }
Escape { static void handleNormalMultiLineStringCharacter(StringBuilder sb, StringBuilder output, StringBuilder original) { char ch = sb.charAt(0); if (ch == '\n' || ch == '\r') { normalizedNewLines(sb, output, original); } else { output.append(ch); original.append(ch); sb.deleteCharAt(0); } }  }
Escape { static void handleNormalMultiLineStringCharacter(StringBuilder sb, StringBuilder output, StringBuilder original) { char ch = sb.charAt(0); if (ch == '\n' || ch == '\r') { normalizedNewLines(sb, output, original); } else { output.append(ch); original.append(ch); sb.deleteCharAt(0); } }   }
Escape { static void handleNormalMultiLineStringCharacter(StringBuilder sb, StringBuilder output, StringBuilder original) { char ch = sb.charAt(0); if (ch == '\n' || ch == '\r') { normalizedNewLines(sb, output, original); } else { output.append(ch); original.append(ch); sb.deleteCharAt(0); } }    }