NullVersion implements Version { @Override public boolean isEqualTo(Version version) { return version instanceof NullVersion; }  @Override boolean isGreaterThan(Version version); @Override boolean isEqualTo(Version version); @Override String asString();  }
@Test public void isEqualToMinimalVersion() throws Exception { boolean minimalVersionIsEqual = new NullVersion().isEqualTo(new NullVersion()); assertThat(minimalVersionIsEqual, is(true)); }
@Test public void isNotEqualToAnyOtherVersion() throws Exception { boolean minimalVersionIsEqual = new NullVersion().isEqualTo(new NumericVersion(0, 0, 0)); assertThat(minimalVersionIsEqual, is(false)); }
@Test public void anyOtherVersionIsNotEqual() throws Exception { boolean minimalVersionIsEqual = new NumericVersion(0, 0, 0).isEqualTo(new NullVersion()); assertThat(minimalVersionIsEqual, is(false)); }