### Question:
StringUtil { public static String deleteCRLFOnce(String input) { return input.replaceAll("((\r\n)|\n)[\\s\t ]*(\\1)+", "$1").replaceAll("^((\r\n)|\n)", ""); }  static String getMiddleString(String text, String lStr, String rStr); static String deleteCRLFOnce(String input); static String str2HexStr(String str); static String hexStr2Str(String hexStr); static String byte2HexStr(byte[] b); static byte[] hexStr2Bytes(String src); static String str2Unicode(String strText); static String unicode2Str(String hex); static String delTagsFContent(String content); static String formatSize(double size); static String getEncoding(byte[] bytes); static List<Node> getFileList(Torrent torrent); static CodepageDetectorProxy detector; }### Answer:
@Test public void testDeleteCRLFOnce() { assertEquals("fooBar", StringUtil.deleteCRLFOnce("fooBar")); assertEquals("foo\nBar", StringUtil.deleteCRLFOnce("foo\n\nBar")); }