DownloadVersion implements Comparable<DownloadVersion> { public boolean isRelease() { return !name.contains("-rc") && !name.contains("preview"); } DownloadVersion(final String name);  DownloadVersion(final String name, final List<DownloadOSFamily> osFamilies); final String getName(); final List<DownloadOSFamily> getOSFamilies(); DownloadOSFamily findFamily(final String name); boolean isRelease(); @Override final int hashCode(); @Override final boolean equals(final Object obj); @Override final String toString(); @Override final int compareTo(final DownloadVersion other);  }
@Test public void testIsRelease() { assertThat(new DownloadVersion("5.0.0-rc1").isRelease()).isFalse(); assertThat(new DownloadVersion("4.1.1-hotfix1").isRelease()).isTrue(); assertThat(new DownloadVersion("4.1.1").isRelease()).isTrue(); assertThat(new DownloadVersion("3.0.0-rc9").isRelease()).isFalse(); assertThat(new DownloadVersion("1.0.0").isRelease()).isTrue(); }