assertTrue(new Version(1, 0, 0, "preview.1").toString().startsWith("1.0.0-preview.1"));
}
@Test
public void testEquals() throws Exception {
assertTrue(new Version(0, 20, 0).equals(new Version(0, 20, 0)));
assertTrue(new Version(0, 20, 0, "preview.1").equals(new Version(0, 20, 0, "preview.1")));
assertTrue(new Version(1, 2, 3).equals(new Version(1, 2, 3)));
Version v = new Version(0, 20, 0);
assertTrue(v.equals(v));
assertFalse(new Version(0, 20, 0).equals(new Version(0, 20, 1)));
assertFalse(new Version(0, 20, 0, "preview.1").equals(new Version(0, 20, 0, "preview.2")));
assertFalse(new Version(0, 20, 0).equals(null));
}