@Test
 public void rootUIDiscovery() throws MalformedURLException {
   assertThat(RootUI.getNumberOfInstances(), is(0));
   openWindow("");
   waitModel.waitForChange(retrieveText.locator(LABEL));
   assertThat(RootUI.getNumberOfInstances(), is(1));
 }
 /**
  * Tests invalid deployment of multiple roots within a WAR Should be started first--arquillian
  * deployments are not perfectly isolated.
  */
 @Test
 @InSequence(-2)
 public void uiPathCollisionBreaksDeployment() throws MalformedURLException {
   assertThat(RootUI.getNumberOfInstances(), is(0));
   deployer.deploy("uiPathCollision");
   openWindowNoWait(deriveMappingForUI(PathCollisionUI.class));
   final String expectedErrorMessage = this.firstWindow.getBodyText();
   assertThat(
       expectedErrorMessage, containsString("VaadinCDIServlet deployment aborted. Reason:"));
   assertThat(RootUI.getNumberOfInstances(), is(0));
 }
 /**
  * Tests invalid deployment of multiple roots within a WAR Should be before the regular
  * tests--arquillian deployments are not perfectly isolated.
  */
 @Test
 @InSequence(-1)
 public void multipleRootsBreakDeployment() throws MalformedURLException {
   assertThat(RootUI.getNumberOfInstances(), is(0));
   deployer.deploy("multipleRoots");
   openWindowNoWait("");
   final String expectedErrorMessage = this.firstWindow.getBodyText();
   assertThat(
       expectedErrorMessage, containsString("VaadinCDIServlet deployment aborted. Reason:"));
   assertThat(RootUI.getNumberOfInstances(), is(0));
 }
 void assertDefaultRootNotInstantiated() {
   assertThat(RootUI.getNumberOfInstances(), is(0));
 }