private void updateServiceInstance(Object result) {
        final Optional<Object> getServer = ReflectUtils.invokeMethod(result, "getServer", null, null);
        if (!getServer.isPresent()) {
            return;
        }
        RetryContext.INSTANCE.updateServiceInstance(getServer.get());
    }
@Test
    public void testBefore() throws Exception {
        final Interceptor interceptor = getInterceptor();
        final ExecuteContext context = interceptor.before(TestHelper.buildDefaultContext());
        assertNull(context.getResult());
        final RetryRule retryRule = new RetryRule();
        retryRule.setRetryOnSame(3);
        RetryContext.INSTANCE.buildRetryPolicy(retryRule);
        final Object instance = new Object();

        // simulated update instance
        RetryContext.INSTANCE.updateServiceInstance(instance);
        interceptor.before(context);
        assertNull(context.getResult());
        RetryContext.INSTANCE.remove();
    }