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 testConfiguredHeartbeat() {
        System.setProperty(Constants.HEARTBEAT_CONFIG_KEY, "200");
        URL url = URL.valueOf("dubbo://127.0.0.1:12345");
        Assertions.assertEquals(200, UrlUtils.getHeartbeat(url));
        System.clearProperty(Constants.HEARTBEAT_CONFIG_KEY);
    }