Source:
<code>public void shouldProperlyCompareVersions() { ServerVersion version = new ServerVersion(ServerVersion.V2_19); <START> Assert.assertTrue(version.isAfter(ServerVersion.V2_18)); <END> Assert.assertTrue(version.isAfter("2.15")); Assert.assertTrue(version.isAfter("2.1")); Assert.assertTrue(version.isAfter("2.0")); Assert.assertTrue(version.isAfter("1.0")); Assert.assertTrue(version.isAfter("0.12")); Assert.assertFalse(version.isAfter(ServerVersion.V2_21)); Assert.assertTrue(version.isSameOrAfter(ServerVersion.V2_19)); Assert.assertTrue(version.isSameOrAfter(ServerVersion.V2_18)); Assert.assertTrue(version.isSameOrAfter("2.15")); Assert.assertTrue(version.isSameOrAfter("2.1")); Assert.assertTrue(version.isSameOrAfter("2.0")); Assert.assertTrue(version.isSameOrAfter("1.0")); Assert.assertTrue(version.isSameOrAfter("0.12")); Assert.assertFalse(version.isSameOrAfter(ServerVersion.V2_21)); Assert.assertTrue(version.isSame(ServerVersion.V2_19)); Assert.assertFalse(version.isSame(ServerVersion.V2_18)); Assert.assertTrue(version.isBefore(ServerVersion.V2_21)); Assert.assertTrue(version.isBefore("2.22")); Assert.assertTrue(version.isBefore("2.30")); Assert.assertTrue(version.isBefore("3.0")); Assert.assertFalse(version.isBefore("2.1")); Assert.assertFalse(version.isBefore("2.17")); Assert.assertTrue(version.isSameOrBefore(ServerVersion.V2_19)); Assert.assertTrue(version.isSameOrBefore(ServerVersion.V2_21)); Assert.assertTrue(version.isSameOrBefore("2.22")); Assert.assertTrue(version.isSameOrBefore("2.30")); Assert.assertTrue(version.isSameOrBefore("3.0")); Assert.assertFalse(version.isSameOrBefore("2.1")); Assert.assertFalse(version.isSameOrBefore("2.17")); }</code><technical_language>static import for asserts, do else</technical_language>

Target:
public void shouldProperlyCompareVersions() { ServerVersion version = new ServerVersion(ServerVersion.V2_19); assertTrue(version.isAfter(ServerVersion.V2_18)); assertTrue(version.isAfter("2.15")); assertTrue(version.isAfter("2.1")); assertTrue(version.isAfter("2.0")); assertTrue(version.isAfter("1.0")); assertTrue(version.isAfter("0.12")); assertFalse(version.isAfter(ServerVersion.V2_21)); assertTrue(version.isSameOrAfter(ServerVersion.V2_19)); assertTrue(version.isSameOrAfter(ServerVersion.V2_18)); assertTrue(version.isSameOrAfter("2.15")); assertTrue(version.isSameOrAfter("2.1")); assertTrue(version.isSameOrAfter("2.0")); assertTrue(version.isSameOrAfter("1.0")); assertTrue(version.isSameOrAfter("0.12")); assertFalse(version.isSameOrAfter(ServerVersion.V2_21)); assertTrue(version.isSame(ServerVersion.V2_19)); assertFalse(version.isSame(ServerVersion.V2_18)); assertTrue(version.isBefore(ServerVersion.V2_21)); assertTrue(version.isBefore("2.22")); assertTrue(version.isBefore("2.30")); assertTrue(version.isBefore("3.0")); assertFalse(version.isBefore("2.1")); assertFalse(version.isBefore("2.17")); assertTrue(version.isSameOrBefore(ServerVersion.V2_19)); assertTrue(version.isSameOrBefore(ServerVersion.V2_21)); assertTrue(version.isSameOrBefore("2.22")); assertTrue(version.isSameOrBefore("2.30")); assertTrue(version.isSameOrBefore("3.0")); assertFalse(version.isSameOrBefore("2.1")); assertFalse(version.isSameOrBefore("2.17")); }