public void TestSerialization()
        {
            EventGroupBuilder x1 = CreateObject <EventGroupBuilder>().WithName("Evan.Builder");

            x1.EventGroupType = "IV Bolus";
            IFormula f1 = CreateObject <ConstantFormula>().WithValue(2.3);
            IFormula f2 = CreateObject <ConstantFormula>().WithDimension(DimensionLength).WithValue(3.4);

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

            x1.Add(p1);
            x1.Add(p2);

            EventBuilder eb1 = CreateObject <EventBuilder>().WithName("Eve.Builder").WithDimension(DimensionLength).WithFormula(f1);
            EventBuilder eb2 = CreateObject <EventBuilder>().WithName("Eva.Builder").WithDimension(DimensionLength).WithFormula(f2);

            eb2.OneTime = true;

            x1.Add(eb1);
            x1.Add(eb2);

            ApplicationBuilder a1 = CreateObject <ApplicationBuilder>().WithName("App.Builder");

            x1.Add(a1);
            var applicationMoleculeBuilder = CreateObject <ApplicationMoleculeBuilder>().WithName("AppMolecule");

            applicationMoleculeBuilder.Formula = f2;
            applicationMoleculeBuilder.RelativeContainerPath = new ObjectPath(new[] { "A", "B" });
            a1.AddMolecule(applicationMoleculeBuilder);

            a1.AddTransport(CreateObject <TransportBuilder>().WithName("PassiveTranport").WithFormula(f1));


            IEventGroupBuilder x2 = SerializeAndDeserialize(x1);

            AssertForSpecs.AreEqualEventGroupBuilder(x1, x2);
        }