SonarQubeTaskUtils { public static String getTaskVersion() { try (InputStream in = SonarQubeTask.class.getResourceAsStream("version.txt")) { Properties props = new Properties(); props.load(in); return props.getProperty("version"); } catch (IOException e) { throw new BuildException("Could not load the version information for SonarQube Ant Task", e); } } private  SonarQubeTaskUtils(); static URL getJarPath(); static int getAntLoggerLever(Project project); static String getTaskVersion();  }
@Test public void shouldGetVersion() { String version = SonarQubeTaskUtils.getTaskVersion(); assertThat(version).contains("."); assertThat(version).doesNotContain("$"); }