### Question:
ResourceVersion implements Comparable<ResourceVersion> { public Integer getVersion() { return version; } ResourceVersion(String value); boolean isWellFormed(); boolean isGA(); boolean isAlpha(); boolean isBeta(); String getPrefix(); Integer getVersion(); String getPrerelease(); Integer getPrereleaseVersion(); @Override int compareTo(ResourceVersion o); String toString(); boolean equals(Object o); int hashCode();  }### Answer:
@Test public void whenParsed_verifyVersions() { ResourceVersion rv; rv = new ResourceVersion("v1"); assertThat(rv.getVersion(), equalTo(1)); rv = new ResourceVersion("v27"); assertThat(rv.getVersion(), equalTo(27)); rv = new ResourceVersion("v100alpha42"); assertThat(rv.getVersion(), equalTo(100)); }
@Test public void whenNotWellFormedButLegalParsed_verifyVersions() { ResourceVersion rv; rv = new ResourceVersion("token20"); assertThat(rv.getVersion(), equalTo(20)); rv = new ResourceVersion("r100"); assertThat(rv.getVersion(), equalTo(100)); rv = new ResourceVersion("prefix3"); assertThat(rv.getVersion(), equalTo(3)); }