public long remainingMs() {
        timer.update();
        return timer.remainingMs();
    }
@Test
    public void testRemainingMs() {
        TimedRequestState state = new TimedRequestState(
            new LogContext(),
            this.getClass().getSimpleName(),
            100,
            1000,
            time.timer(DEFAULT_TIMEOUT_MS)
        );
        assertEquals(DEFAULT_TIMEOUT_MS, state.remainingMs());
        time.sleep(DEFAULT_TIMEOUT_MS);
        assertEquals(0, state.remainingMs());
    }