DefaultVersionConstraint implements VersionConstraint { @Override public boolean isCompatible(Version version) { boolean compatible; if (getVersion() == null) { compatible = containsVersion(version); } else { compatible = version.compareTo(getVersion()) >= 0; } return compatible; } DefaultVersionConstraint(String rawConstraint);  DefaultVersionConstraint(VersionConstraint versionConstraint);  DefaultVersionConstraint(Collection<? extends VersionRangeCollection> ranges, Version version);  DefaultVersionConstraint(Version version); @Override Collection<VersionRangeCollection> getRanges(); @Override Version getVersion(); @Override boolean containsVersion(Version version); @Override boolean isCompatible(Version version); @Override VersionConstraint merge(VersionConstraint versionConstraint); @Override String getValue(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test void isCompatible() { assertTrue(new DefaultVersionConstraint("1.0").isCompatible((Version) new DefaultVersion("1.0"))); assertTrue(new DefaultVersionConstraint("1.0").isCompatible((Version) new DefaultVersion("2.0"))); assertTrue(new DefaultVersionConstraint("1.0").isCompatible(new TestVersion("1.0"))); assertTrue(new DefaultVersionConstraint("1.0").isCompatible(new TestVersion("2.0"))); }