public void CheckThatServiseIsNotRunWhenTheCreatingOfANewSessionIsFailed()
        {
            string app = Apps.get("androidApiDemos");

            DesiredCapabilities capabilities = new DesiredCapabilities();

            capabilities.SetCapability(MobileCapabilityType.DeviceName, "iPhone Simulator");

            OptionCollector argCollector = new OptionCollector().AddArguments(GeneralOptionList.App(app)) //it will be a cause of error
                                                                                                          //that is expected
                                           .AddArguments(GeneralOptionList.AutomationName(AutomationName.Appium)).AddArguments(GeneralOptionList.PlatformName("Android"));

            AppiumServiceBuilder builder = new AppiumServiceBuilder().WithArguments(argCollector);
            AppiumLocalService   service = builder.Build();

            service.Start();

            IOSDriver <AppiumWebElement> driver = null;

            try
            {
                try
                {
                    driver = new IOSDriver <AppiumWebElement>(service, capabilities);
                }
                catch (Exception e)
                {
                    Assert.IsTrue(!service.IsRunning);
                    return;
                }
                throw new Exception("Any exception was expected");
            }
            finally
            {
                if (driver != null)
                {
                    driver.Quit();
                }
            }
        }