private void responseTrigger(final Upstream upstream) {
        long now = System.currentTimeMillis();
        upstream.getInflight().decrementAndGet();
        upstream.setResponseStamp(now);
        long stamp = upstream.getResponseStamp();
        long td = now - stamp;
        if (td < 0) {
            td = 0;
        }
        double w = Math.exp((double) -td / (double) 600);

        long lag = now - upstream.getLastPicked();
        if (lag < 0) {
            lag = 0;
        }
        long oldLag = upstream.getLag();
        if (oldLag == 0) {
            w = 0;
        }
        lag = (int) ((double) oldLag * w + (double) lag * (1.0 - w));
        upstream.setLag(lag);
    }
@Test
    public void responseTriggerTest() throws NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException {
        Upstream upstream = Upstream.builder()
                .url("upstream")
                .build();
        assertEquals(0, upstream.getLag());
        Method method = DividePlugin.class.getDeclaredMethod("responseTrigger", Upstream.class);
        method.setAccessible(true);
        method.invoke(DividePlugin.class.newInstance(), upstream);
        assertNotEquals(0, upstream.getLag());
    }