public void TestSerialization()
        {
            EventBuilder x1 = CreateObject <EventBuilder>().WithName("Eve.Builder").WithDimension(DimensionLength);

            x1.Formula = CreateObject <ConstantFormula>().WithDimension(DimensionLength).WithValue(23.4);
            x1.OneTime = true;

            IFormula           f1  = CreateObject <ExplicitFormula>().WithDimension(DimensionLength).WithFormulaString("3*Patty");
            IFormulaUsablePath fup = new FormulaUsablePath(new string[] { "Patricia" }).WithAlias("Patty").WithDimension(DimensionLength);

            f1.AddObjectPath(fup);
            IFormula f2 = CreateObject <ConstantFormula>().WithDimension(DimensionLength).WithValue(23.4);

            IParameter p1 = WithExtensions.WithValue <Parameter>(CreateObject <Parameter>().WithName("Patricia").WithFormula(f1), 3.1);
            IParameter p2 = WithExtensions.WithValue <Parameter>(CreateObject <Parameter>().WithName("Pascal").WithFormula(f1), 3.2);

            x1.AddParameter(p1);
            x1.AddParameter(p2);

            IEventAssignmentBuilder eab1 = CreateObject <EventAssignmentBuilder>().WithDimension(DimensionLength).WithFormula(f1).WithName("eab1");
            IEventAssignmentBuilder eab2 = CreateObject <EventAssignmentBuilder>().WithFormula(f2).WithName("eab2");

            x1.AddAssignment(eab1);
            x1.AddAssignment(eab2);

            var x2 = SerializeAndDeserialize(x1);

            AssertForSpecs.AreEqualEventBuilder(x1, x2);
        }