@Override
    public ExecuteContext before(ExecuteContext context) throws Exception {
        if (MARK.get() != null) {
            return context;
        }
        MARK.set(Boolean.TRUE);
        try {
            ready();
            return doBefore(context);
        } finally {
            MARK.remove();
        }
    }
@Test
    public void test() throws Exception {
        final MarkInterceptor markInterceptor = new MarkInterceptor() {
            @Override
            protected ExecuteContext doBefore(ExecuteContext context) {
                return context;
            }

            @Override
            protected void ready() {
            }

            @Override
            public ExecuteContext after(ExecuteContext context) {
                return context;
            }

            @Override
            public ExecuteContext onThrow(ExecuteContext context) {
                return context;
            }
        };
        final CountDownLatch countDownLatch = new CountDownLatch(1);
        final ExecuteContext executeContext = buildContext(new Object());
        final ExecuteContext before = markInterceptor.before(executeContext);
        final Thread thread = new Thread(() -> {
            try {
                markInterceptor.before(executeContext);
                countDownLatch.countDown();
            } catch (Exception exception) {
                // ignored
            }
        });
        thread.start();
        countDownLatch.await();
        Assert.assertEquals(before, executeContext);
    }