### Question:
ResourceVersion implements Comparable<ResourceVersion> { public String toString() { return value; } 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 whenMultipleValues_sort() { List<String> values = Arrays.asList( "v11beta2", "foo1", "v3beta2", "v2", "v1", "v3beta1", "v11alpha2", "v10beta3", "v10", "foo10", "v12alpha1"); List<ResourceVersion> rvs = values.stream().map(e -> new ResourceVersion(e)).collect(Collectors.toList()); Collections.sort(rvs); List<String> actual = rvs.stream().map(e -> e.toString()).collect(Collectors.toList()); List<String> expected = Arrays.asList( "foo10", "foo1", "v11alpha2", "v12alpha1", "v3beta1", "v3beta2", "v10beta3", "v11beta2", "v1", "v2", "v10"); assertEquals(expected, actual); }