public void ExpressionBuilt_OnInstanceWithInitializer_GetsExpressionWhereInitializerIsApplied()
        {
            // Arrange
            Expression actualBuiltExpression = null;

            var container = ContainerFactory.New();

            container.Register <IUserRepository, SqlUserRepository>();

            container.RegisterInitializer <SqlUserRepository>(repository => { });

            container.ExpressionBuilt += (sender, e) =>
            {
                Assert.AreEqual(e.RegisteredServiceType, typeof(IUserRepository), "Test setup fail.");
                actualBuiltExpression = e.Expression;
            };

            // Act
            container.GetInstance <IUserRepository>();

            // Assert
            AssertThat.IsNotInstanceOfType(typeof(NewExpression), actualBuiltExpression,
                                           "The initializer is expected to be applied BEFORE the ExpressionBuilt event ran.");
        }