code: public static void endContext(ControlContainerContext context)
      {
          Stack<ControlContainerContext> contextStack = _threadContexts.get();
          if (contextStack == null || contextStack.size() == 0)
              throw new IllegalStateException("No context started for current thread");
  
          if (contextStack.peek() != context)
              throw new IllegalStateException("Context is not the current active context");
  
          contextStack.pop();
      }
docs: Ends the current control container execution context
  @throws IllegalStateException if there is not current active context or it is not
  the requested context.