PostExecutionInterceptorContext extends AbstractInterceptorContext<PreExecutionInterceptorContext> { public PostExecutionInterceptorContext mustPreserveCallTree(String reason) { if (getSpanContext().getCallTree() == null) { logger.info("Can't preserve the call tree because it has not been collected"); } logger.debug("Must preserve call tree because {}", reason); mustPreserveCallTree = true; excludeCallTree = false; return this; } PostExecutionInterceptorContext(SpanContextInformation spanContext); PostExecutionInterceptorContext excludeCallTree(String reason); PostExecutionInterceptorContext mustPreserveCallTree(String reason); boolean isExcludeCallTree();  }
@Test public void mustPreserveCallTree() throws Exception { interceptorContext.excludeCallTree("reasons"); interceptorContext.mustPreserveCallTree("reasons"); assertFalse(interceptorContext.isExcludeCallTree()); interceptorContext.excludeCallTree("reasons"); assertFalse(interceptorContext.isExcludeCallTree()); }