function createAndInstallTestInstances() {
  // Create and install the developer provided Auth instances.
  testApp = new firebaseui.auth.testing.FakeAppClient(options);
  testAuth = testApp.auth();
  testAuth.install();
  testApp1 = new firebaseui.auth.testing.FakeAppClient(options, 'testapp1');
  testAuth1 = testApp1.auth();
  testAuth1.install();
  testApp2 = new firebaseui.auth.testing.FakeAppClient(options, 'testapp2');
  testAuth2 = testApp2.auth();
  testAuth2.install();
  testApp3 = new firebaseui.auth.testing.FakeAppClient(options, 'testapp3');
  testAuth3 = testApp3.auth();
  testAuth3.install();
  // Initialize all test apps. Do not supply an app id for third instance.
  app1 = new firebaseui.auth.AuthUI(testAuth1, 'id1');
  // Install all internal instances.
  app1.getAuth().assertSetPersistence(['session'], null);
  app2 = new firebaseui.auth.AuthUI(testAuth2, 'id2');
  app2.getAuth().assertSetPersistence(['session'], null);
  app3 = new firebaseui.auth.AuthUI(testAuth3);
  app3.getAuth().assertSetPersistence(['session'], null);
  // Initialize config objects.
  config1 = {
    'signInSuccessUrl': 'http://localhost/home1',
    'widgetUrl': 'http://localhost/firebase1',
  };
  config2 = {
    'signInSuccessUrl': 'http://localhost/home2',
    'widgetUrl': 'http://localhost/firebase2',
  };
  config3 = {
    'signInSuccessUrl': 'http://localhost/home3',
    'widgetUrl': 'http://localhost/firebase3',
  };
  config4 = {
    'signInSuccessUrl': 'http://localhost/home4',
    'widgetUrl': 'http://localhost/firebase4',
  };
  // Set application configurations.
  app1.setConfig(config1);
  app2.setConfig(config2);
  app3.setConfig(config3);
}
Creates and installs all auth, app and AuthUI instances for tests.