public static function buildObject(
            $className, 
            array $args = [], 
            $instanceName = 'default', 
            $beforeBuildBootstrapMethod = null,
            $afterBuildBootstrapMethod = null
    )
    {
        if (!isset(static::$instances[static::$mockNamespace][$className][$instanceName])) {
            if ($beforeBuildBootstrapMethod !== null) {
                $bootstrap = Container::getBootstrap();
                if (!is_callable([$bootstrap, $beforeBuildBootstrapMethod])) {
                    throw new ArchException("Bootstrap method $beforeBuildBootstrapMethod() must be declared in your bootstrap file");
                }
                $bootstrap->$beforeBuildBootstrapMethod();
            }
            $class = new \ReflectionClass($className);
            if (!$class->isInstantiable()) {
                throw new ArchException('Class ' . $className . ' must be instanciable');
            }
            static::$instances[static::$mockNamespace][$className][$instanceName]
                = count($args)
                ? $class->newInstanceArgs($args)
                : $class->newInstance();
            if ($afterBuildBootstrapMethod !== null) {
                $bootstrap = Container::getBootstrap();
                if (!method_exists($bootstrap, $afterBuildBootstrapMethod)) {
                    throw new ArchException("Bootstrap method $afterBuildBootstrapMethod() must be declared in your bootstrap file");
                }
                $bootstrap->$afterBuildBootstrapMethod();
            }
        }
        return static::$instances[static::$mockNamespace][$className][$instanceName];
    }