### Question:
SentenceExtractor { Pattern constructEndSentencePattern() { if (this.fullStopList == null || this.fullStopList.length == 0) { throw new IllegalArgumentException("No end character is specified"); } StringBuilder patternString = new StringBuilder(); generateSimplePattern(this.fullStopList, patternString); patternString.append("["); for (char rightQuotation : rightQuotationList) { patternString.append(rightQuotation); } patternString.append("]?"); return Pattern.compile(patternString.toString()); } SentenceExtractor(char...fullStopList);  SentenceExtractor(SymbolTable symbolTable);   SentenceExtractor(char[] fullStopList, char[] rightQuotationList); int extract(String line, List<Pair<Integer, Integer>> sentencePositions); int getSentenceEndPosition(String str); String getBrokenLineSeparator();  }### Answer:
@Test void testConstructPatternStringWithoutEscape() { char[] endCharacters = {'.', '?', '!'}; SentenceExtractor extractor = new SentenceExtractor(endCharacters); assertEquals("[\\.\\?\\!][\'\"]?", extractor.constructEndSentencePattern().pattern()); }
@Test void testThrowExceptionGivenVoidList() { assertThrows(IllegalArgumentException.class, () -> { char[] endCharacters = {}; SentenceExtractor extractor = new SentenceExtractor(endCharacters); extractor.constructEndSentencePattern(); }); }
@Test void testThrowExceptionGivenNull() { SentenceExtractor extractor = new SentenceExtractor(Configuration.builder().build().getSymbolTable()); extractor.constructEndSentencePattern(); }