public DelayedResponse(JRTServerConfigRequest request) {
        this(request, System.currentTimeMillis() + request.getTimeout());
    }
@Test
    void testDelayedResponse() {
        ConfigTester tester = new ConfigTester();
        final long timeout = 20000;
        JRTServerConfigRequest request1 = tester.createRequest("baz", configId, namespace, timeout);
        DelayedResponse delayed1 = new DelayedResponse(request1);
        assertTrue(delayed1.getReturnTime() > System.currentTimeMillis());
        assertTrue(delayed1.getDelay(TimeUnit.MILLISECONDS) > 0);
        assertTrue(delayed1.getDelay(TimeUnit.MILLISECONDS) <= timeout);

        // Just to make sure we do not get requests within the same millisecond
        try {
            Thread.sleep(1);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        // New request, should have larger delay than the first
        JRTServerConfigRequest request2 = tester.createRequest("baz", configId, namespace, timeout);
        DelayedResponse delayed2 = new DelayedResponse(request2);
        assertTrue(delayed2.getReturnTime() > delayed1.getReturnTime(),
                                 "delayed1=" + delayed1.getReturnTime() + ", delayed2=" +
                                                          delayed2.getReturnTime() + ": delayed2 should be greater than delayed1");

        // Test compareTo() method
        assertEquals(0, delayed1.compareTo(delayed1));
        assertEquals(-1, delayed1.compareTo(delayed2));
        assertEquals(1, delayed2.compareTo(delayed1));
    }