### Question:
VersionsHelper { public String getLatestReleasedVersion(Artifact artifact){ return getLatestReleasedVersion(getVersions(artifact)); } VersionsHelper(ArtifactFactory artifactFactory, MavenProject mavenProject, MavenSession mavenSession, ArtifactMetadataSource artifactMetadataSource); String getLatestReleasedVersion(Artifact artifact); String getLatestSnapshotVersion(Artifact artifact); String getLatestSnapshotVersion(List<ArtifactVersion> versions); String getLatestReleasedVersion(List<ArtifactVersion> versions); List<String> getVersionAdvice(Artifact artifact, int maxReleases); List<String> getVersionAdvice(List<ArtifactVersion> allVersions, int maxSize);  }### Answer:
@Test public void getLatestReleasedVersion_shouldNotIncludeSnapshots(){ String res = helper.getLatestReleasedVersion( createTestVersions("1.8.8", "1.8.3", "1.8.10-SNAPSHOT", "1.8.9-alpha")); assertThat(res, is(equalTo("1.8.8"))); }