XfsVersionRange { public boolean contains(XfsVersion version) { if (minVersion != null && minVersion.compareTo(version) > 0) { return false; } else if (maxVersion != null && maxVersion.compareTo(version) < 0) { return false; } return true; } XfsVersionRange(XfsVersion minVersion, XfsVersion maxVersion); XfsVersion getMinVersion(); XfsVersion getMaxVersion(); boolean contains(XfsVersion version);  }
@Test public void fromV3_00ToV3_10() { XfsVersionRange range = new XfsVersionRange(XfsVersion.V3_00, XfsVersion.V3_10); Assert.assertFalse(range.contains(XfsVersion.V2_00)); Assert.assertTrue(range.contains(XfsVersion.V3_00)); Assert.assertTrue(range.contains(XfsVersion.V3_10)); Assert.assertFalse(range.contains(XfsVersion.V3_20)); }
@Test public void fromV3_00ToNull() { XfsVersionRange range = new XfsVersionRange(XfsVersion.V3_00, null); Assert.assertFalse(range.contains(XfsVersion.V2_00)); Assert.assertTrue(range.contains(XfsVersion.V3_00)); Assert.assertTrue(range.contains(XfsVersion.V3_10)); Assert.assertTrue(range.contains(XfsVersion.V3_20)); }
@Test public void fromNullToV3_10() { XfsVersionRange range = new XfsVersionRange(null, XfsVersion.V3_10); Assert.assertTrue(range.contains(XfsVersion.V2_00)); Assert.assertTrue(range.contains(XfsVersion.V3_00)); Assert.assertTrue(range.contains(XfsVersion.V3_10)); Assert.assertFalse(range.contains(XfsVersion.V3_20)); }