GenericRequestorInterceptor extends AbstractRequestInterceptor { @Override public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, MethodInterceptResult result) throws Throwable { AvroInstance instance = (AvroInstance) objInst.getSkyWalkingDynamicField(); AbstractSpan span = ContextManager.createExitSpan(instance.namespace + allArguments[0], instance.remotePeer); SpanLayer.asRPCFramework(span); span.setPeer(instance.remotePeer); span.setComponent(ComponentsDefine.AVRO_CLIENT); }  @Override void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
        MethodInterceptResult result);  }
@Test public void testBefore() throws Throwable { interceptor.beforeMethod(instance, null, arguments, null, null); interceptor.afterMethod(instance, null, arguments, null, null); List<TraceSegment> segments = segmentStorage.getTraceSegments(); Assert.assertEquals(segments.size(), 1); List<AbstractTracingSpan> spans = SegmentHelper.getSpans(segments.get(0)); Assert.assertEquals(spans.size(), 1); AbstractTracingSpan span = spans.get(0); spanCommonAssert(span, "example.proto.Greeter.hello"); }