OpeningQuote extends RegexSyntaxElement { public OpeningQuote(RegexSource source) { super(source, new IndexRange(-1, 0)); } OpeningQuote(RegexSource source); @Override String getText(); @Override List<Location> getLocations();  }
@Test void testGetTextException() { RegexParseResult result = assertSuccessfulParseResult("abc"); RegexSyntaxElement openingQuote = result.openingQuote(); assertThrows(UnsupportedOperationException.class, openingQuote::getText); }