SonarDetector { public boolean isSonarWelcomePage(URL url) { return client.contains(url, "Sonar"); }  boolean isSonarPropertiesPage(URL url); boolean isSonarWelcomePage(URL url); String buildPropertiesUrl(URL url);  }
@Test public void should_return_true_if_url_with_page_contains_Sonar() throws Exception { URL url = new URL("http: when(client.contains(any(URL.class), eq("Sonar"))).thenReturn(true); assertTrue(sonarDetector.isSonarWelcomePage(url)); }