Version { @Override public String toString() { return version.toString(); } Version(String version); boolean isGreaterThan(String version); @Override String toString();  }
@Test public void should_return_version_to_string() throws Exception { Version version = new Version("1.2.2-SNAPHOT"); assertThat(version.toString()).isEqualTo("1.2.2-SNAPHOT"); }