public static int getIdleTimeout(URL url) {
        int heartBeat = getHeartbeat(url);
        // idleTimeout should be at least more than twice heartBeat because possible retries of client.
        int idleTimeout = url.getParameter(Constants.HEARTBEAT_TIMEOUT_KEY, heartBeat * 3);
        if (idleTimeout < heartBeat * 2) {
            throw new IllegalStateException("idleTimeout < heartbeatInterval * 2");
        }
        return idleTimeout;
    }
@Test
    void testGetIdleTimeout() {
        URL url1 = URL.valueOf("dubbo://127.0.0.1:12345?heartbeat=10000");
        URL url2 = URL.valueOf("dubbo://127.0.0.1:12345?heartbeat=10000&heartbeat.timeout=50000");
        URL url3 = URL.valueOf("dubbo://127.0.0.1:12345?heartbeat=10000&heartbeat.timeout=10000");
        Assertions.assertEquals(UrlUtils.getIdleTimeout(url1), 30000);
        Assertions.assertEquals(UrlUtils.getIdleTimeout(url2), 50000);
        Assertions.assertThrows(RuntimeException.class, () -> UrlUtils.getIdleTimeout(url3));
    }