### Question:
StringUtil { public static String getMiddleString(String text, String lStr, String rStr) { String result = ""; int left = -1; int right = -1; left = text.indexOf(lStr); if (left >= 0) { right = text.indexOf(rStr, left); } if (left >= 0 && right > 0) { result = text.substring(left + lStr.length(), right); } return result; }  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 testGetMiddleString() { assertEquals("", StringUtil.getMiddleString(">>", ">", ">>???????")); thrown.expect(StringIndexOutOfBoundsException.class); StringUtil.getMiddleString("??>>>>>>?", ">>>>>>", ""); }