@Test(expected = LimitedRegexCharSequence.RegexTimeoutException.class)
public void testAccessDoesTimeout() {

    TestTicker ticker = new TestTicker();
    LimitedRegexCharSequence lrcs = new LimitedRegexCharSequence(simpleString, 100, ticker);
    ticker.setElapsed(TimeUnit.NANOSECONDS.convert(101, TimeUnit.MILLISECONDS));
    lrcs.charAt(0); // This should throw RegexTimeoutException
}