public void Clone_StateUnderTestSource_ReturnsCopy()
        {
            string name            = "Операция 1";
            string luaName         = "LuaName 1";
            int    defaultPosition = 1;
            var    operation       = new BaseOperation(null)
            {
                Name            = name,
                LuaName         = luaName,
                DefaultPosition = defaultPosition
            };

            var runStep1   = new BaseStep("fRun", "RunFirSt", 1, operation);
            var runStep2   = new BaseStep("sRun", "RunSecSt", 2, operation);
            var stopStep1  = new BaseStep("fSt", "StopFirSt", 0, operation);
            var pauseStep1 = new BaseStep("fP", "PauseFirst", 1, operation);
            var pauseStep2 = new BaseStep("sP", "PauseSecond", 0, operation);

            var addingStates = new Dictionary <string, List <BaseStep> >
            {
                {
                    State.StateType.RUN.ToString(),
                    new List <BaseStep> {
                        runStep1, runStep2
                    }
                },
                {
                    State.StateType.PAUSE.ToString(),
                    new List <BaseStep> {
                        pauseStep1, pauseStep2
                    }
                },
                {
                    State.StateType.STOP.ToString(),
                    new List <BaseStep> {
                        stopStep1
                    }
                }
            };

            FillBaseOperationStatesWithReset(operation, addingStates);

            operation.AddActiveParameter("p1", "пар1", string.Empty);
            operation.AddActiveParameter("p2", "пар2", string.Empty);

            var baseTechObj = new BaseTechObject()
            {
                S88Level = 1
            };
            var objParams = new List <BaseParameter>()
            {
                new ActiveParameter("op1", "обПар1"),
                new ActiveParameter("op2", "обПар2"),
            };

            operation.AddProperties(objParams, baseTechObj);

            BaseOperation cloned = operation.Clone();

            Assert.Multiple(() =>
            {
                Assert.AreEqual(operation.DefaultPosition,
                                cloned.DefaultPosition);
                Assert.AreEqual(operation.Name, cloned.Name);
                Assert.AreEqual(operation.LuaName, cloned.LuaName);
                Assert.IsNull(cloned.Owner);

                foreach (var property in operation.Properties)
                {
                    bool hasTheSameProperty = cloned.Properties
                                              .Where(x => x.Name == property.Name &&
                                                     x.LuaName == property.LuaName &&
                                                     (x.Owner != property.Owner || x.Owner == baseTechObj))
                                              .Count() == 1;
                    Assert.IsTrue(hasTheSameProperty);
                }

                foreach (var state in operation.States.Keys)
                {
                    Assert.True(cloned.States.ContainsKey(state));
                    foreach (var step in operation.States[state])
                    {
                        Assert.True(cloned.States[state]
                                    .Where(x => x.Name == step.Name &&
                                           x.LuaName == step.LuaName &&
                                           x.DefaultPosition == step.DefaultPosition &&
                                           x.Owner != step.Owner)
                                    .Count() == 1);
                    }
                }
            });
        }