CurrentMavenVersion { ComparableVersion get() { return version; } CurrentMavenVersion();   CurrentMavenVersion(String buildConfigLocation); static CurrentMavenVersion read(); boolean isGreaterThanOrEqualTo(String version); boolean hasBuiltInColor();  }
@Test public void read_version_from_configuration_file() { ComparableVersion result = new CurrentMavenVersion("/version/1.0.properties").get(); assertThat(result).isEqualTo(new ComparableVersion("1.0")); }
@Test public void return_version_0_when_version_is_missing() { ComparableVersion result = new CurrentMavenVersion("/version/no-version.properties").get(); assertThat(result).isEqualTo(new ComparableVersion("0")); }
@Test public void return_version_0_when_build_config_cannot_be_read() { ComparableVersion result = new CurrentMavenVersion("/version/does-not-exist.properties").get(); assertThat(result).isEqualTo(new ComparableVersion("0")); }