public static void ConfigureMockWebUI(IPlatformProxy platformProxy, IWebUI webUi = null)
        {
            IWebUIFactory mockFactory = Substitute.For <IWebUIFactory>();

            mockFactory.CreateAuthenticationDialog(Arg.Any <CoreUIParent>(), Arg.Any <RequestContext>()).Returns(webUi);
            platformProxy.SetWebUiFactory(mockFactory);
        }