@Override
    public void beforeRequest() {
        if (!isEnable()) {
            return;
        }
        final long allRequest = allRequestCount.incrementAndGet();
        if (allRequest <= 0) {
            allRequestCount.set(0);
            LOGGER.info("SimpleRequestRecorder has over the max num of long, it has been reset to 0!");
        }
        LOGGER.info(String.format(Locale.ENGLISH,
                "currentTime: %s request count handle by plugin is: %s",
                HttpConstants.currentTime(), allRequest));
    }
@Test
    public void beforeRequest() {
        final SimpleRequestRecorder simpleRequestRecorder = new SimpleRequestRecorder();
        simpleRequestRecorder.beforeRequest();
        final Optional<Object> allRequestCount = ReflectUtils.getFieldValue(simpleRequestRecorder, "allRequestCount");
        Assert.assertTrue(allRequestCount.isPresent() && allRequestCount.get() instanceof AtomicLong);
        Assert.assertTrue(((AtomicLong) allRequestCount.get()).get() > 0);

        // Set the maximum so that the overflow is set to 0
        ((AtomicLong) allRequestCount.get()).set(Long.MAX_VALUE);
        simpleRequestRecorder.beforeRequest();
        Assert.assertEquals(((AtomicLong) allRequestCount.get()).get(), 0);

        // Print the logs
        discoveryPluginConfig.setEnableRequestCount(true);
        final SimpleRequestRecorder simpleRequestRecorder1 = new SimpleRequestRecorder();
        simpleRequestRecorder1.beforeRequest();
    }