@Test
public void should_extract_version_from_welcome_page() throws Exception {

    when(sonarDetector.isSonarWelcomePage(any(URL.class))).thenReturn(true);
    when(sonarVersionExtractor.welcomePageVersion(any(URL.class))).thenReturn("2.5");
    URL url = new URL("http://sonar.com/v25");
    SoftwareId softwareId = sonar.getSoftwareId(url, properties);
    assertTrue(softwareId.isCompatible());
}