GAV implements Serializable { public boolean isSnapshot() { return version != null && version.endsWith("-SNAPSHOT"); } GAV();  GAV(final String gavString);  GAV(final String groupId,
               final String artifactId,
               final String version); String getGroupId(); String getArtifactId(); String getVersion(); void setGroupId(String groupId); void setArtifactId(String artifactId); void setVersion(String version); @Override String toString(); boolean isGAVEqual(Object o); boolean isSnapshot(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void isSnapshotTest() { GAV noSnapshot1 = new GAV(), noSnapshot2 = new GAV("group:artifact:1.0"), noSnapshot3 = new GAV("group", "artifact", "version"), noSnapshot4 = new GAV("group", "artifact", null), snapshot = new GAV("group", "artifact", "1.0-SNAPSHOT"); assertThat(noSnapshot1.isSnapshot()).isFalse(); assertThat(noSnapshot2.isSnapshot()).isFalse(); assertThat(noSnapshot3.isSnapshot()).isFalse(); assertThat(noSnapshot4.isSnapshot()).isFalse(); assertThat(snapshot.isSnapshot()).isTrue(); }