MongoDBClientDelegateInterceptor implements InstanceConstructorInterceptor, InstanceMethodsAroundInterceptor { @Override public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Object ret) { if (ret instanceof EnhancedInstance) { EnhancedInstance retInstance = (EnhancedInstance) ret; String remotePeer = (String) objInst.getSkyWalkingDynamicField(); if (LOGGER.isDebugEnable()) { LOGGER.debug("Mark OperationExecutor remotePeer: {}", remotePeer); } retInstance.setSkyWalkingDynamicField(remotePeer); } return ret; }  @SuppressWarnings("deprecation") @Override void onConstruct(EnhancedInstance objInst, Object[] allArguments); @Override void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
        MethodInterceptResult result); @Override Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
        Object ret); @Override void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
        Class<?>[] argumentsTypes, Throwable t);  }
@Test public void testAfterMethod() { interceptor.afterMethod(clientDelegateEnhancedInstance, null, null, null, retEnhancedInstance); Assert.assertEquals(REMOTE_PEER, retEnhancedInstance.getSkyWalkingDynamicField()); }