public void TestCalculationController()
        {
            InputData.ActualInputData = new InputData(0, 1, 0, 1);
            CalculationController.Initialize(1);
            CalculationController.Calculate();
            Thread.Sleep(100);                                                   //wait until the calculation should be ready
            Assert.AreNotEqual(BrakeOutput.LastCalculation.BrakeMomentFront, 0); //due to the calculate the value dshould have changed
            float oldValue = BrakeOutput.LastCalculation.BrakeMomentFront;

            InputData.ActualInputData = new InputData(1, 0, 0, 2);
            CalculationController.Interrupt();
            CalculationController.Calculate();
            Thread.Sleep(100);                                                       //wait until the calculation should be ready
            Assert.AreEqual(oldValue, BrakeOutput.LastCalculation.BrakeMomentFront); //the value should not have change because the calculation was interrupted
            CalculationController.Initialize(1);                                     //Continue the Calculation
            CalculationController.Calculate();
            Thread.Sleep(100);                                                       //wait until the calculation should be ready
            Assert.AreEqual(0, BrakeOutput.LastCalculation.BrakeMomentFront);
            CalculationController.Terminate();
        }
 private void OnDestroy()
 {
     CalculationController.Interrupt();
 }