public static int getHeartbeat(URL url) {
        String configuredHeartbeat = System.getProperty(Constants.HEARTBEAT_CONFIG_KEY);
        int defaultHeartbeat = Constants.DEFAULT_HEARTBEAT;
        if (StringUtils.isNotEmpty(configuredHeartbeat)) {
            try {
                defaultHeartbeat = Integer.parseInt(configuredHeartbeat);
            } catch (NumberFormatException e) {
                // use default heartbeat
            }
        }
        return url.getParameter(Constants.HEARTBEAT_KEY, defaultHeartbeat);
    }
@Test
    void testGetHeartbeat() {
        URL url = URL.valueOf("dubbo://127.0.0.1:12345?heartbeat=10000");
        Assertions.assertEquals(UrlUtils.getHeartbeat(url), 10000);
    }