public static void saveInstanceInfo(RequestInfo requestInfo) {
        String key = requestInfo.getHost() + RemovalConstants.CONNECTOR + requestInfo.getPort();
        InstanceInfo info = INSTANCE_MAP.computeIfAbsent(key, value -> {
            InstanceInfo instanceInfo = new InstanceInfo();
            instanceInfo.setHost(requestInfo.getHost());
            instanceInfo.setPort(requestInfo.getPort());
            return instanceInfo;
        });
        if (!requestInfo.isSuccess()) {
            info.getRequestFailNum().getAndIncrement();
        }
        info.getRequestNum().getAndIncrement();
        info.setLastInvokeTime(requestInfo.getRequestTime());
    }
@Test
    public void saveInstanceInfo() {
        long time = System.currentTimeMillis();
        for (int i = 0; i < NUM; i++) {
            RequestInfo requestInfo = new RequestInfo();
            requestInfo.setHost(HOST);
            requestInfo.setPort(PORT);
            requestInfo.setSuccess(true);
            requestInfo.setRequestTime(time);
            InstanceCache.saveInstanceInfo(requestInfo);
        }
        for (int i = 0; i < NUM; i++) {
            RequestInfo requestInfo = new RequestInfo();
            requestInfo.setHost(HOST);
            requestInfo.setPort(PORT);
            requestInfo.setSuccess(false);
            requestInfo.setRequestTime(time);
            InstanceCache.saveInstanceInfo(requestInfo);
        }
        Assert.assertTrue(InstanceCache.INSTANCE_MAP.containsKey(KEY));
        InstanceInfo instanceInfo = InstanceCache.INSTANCE_MAP.get(KEY);
        Assert.assertEquals(instanceInfo.getHost(), HOST);
        Assert.assertEquals(instanceInfo.getPort(), PORT);
        Assert.assertEquals(instanceInfo.getRequestNum().get(), NUM * 2);
        Assert.assertEquals(instanceInfo.getLastInvokeTime(), time);
    }