@Test public void danglingViewCauses404() throws MalformedURLException { openWindow(DANGLING_VIEW_URI); waitModel.until(elementPresent.locator(LABEL)); firstWindow.click(NAVIGATE_BUTTON); waitModel.waitForChange(retrieveText.locator(LABEL)); assertThat(SecondUI.getNumberOfInstances(), is(1)); assertThat(DanglingView.getNumberOfInstances(), is(0)); }