private function createProxy($className, callable $serviceFactory, Container $app)
    {
        return $this->proxyFactory->createProxy(
            $className,
            function (&$wrappedObject, $proxy, $method, $parameters, &$initializer) use (
                $className,
                $serviceFactory,
                $app
            ) {
                $wrappedObject = $serviceFactory($app);
                $initializer = null;
                return true;
            }
        );
    }