NullVersion implements Version { @Override public boolean isGreaterThan(Version version) { return false; }  @Override boolean isGreaterThan(Version version); @Override boolean isEqualTo(Version version); @Override String asString();  }
@Test public void anyVersionIsGreater() throws Exception { boolean minimalVersionIsSmaller = new NumericVersion(0, 0, 0).isGreaterThan(new NullVersion()); assertThat(minimalVersionIsSmaller, is(true)); }
@Test public void isNotGreaterThanAnyVersion() throws Exception { boolean minimalVersionIsSmaller = !new NullVersion().isGreaterThan(new NumericVersion(0, 0, 0)); assertThat(minimalVersionIsSmaller, is(true)); }