@Override
    public boolean equals(final Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        final Version that = (Version) o;
        return version.equals(that.getVersion());
    }
@Test
    public void testEquals() throws Exception {
        assertTrue(Version.from(0, 20, 0).equals(Version.from(0, 20, 0)));
        assertTrue(Version.from(0, 20, 0, "preview.1").equals(Version.from(0, 20, 0, "preview.1")));
        assertTrue(Version.from(1, 2, 3).equals(Version.from(1, 2, 3)));

        Version v = Version.from(0, 20, 0);
        assertEquals(Version.from(0, 20, 0), v);

        assertFalse(Version.from(0, 20, 0).equals(Version.from(0, 20, 1)));
        assertFalse(Version.from(0, 20, 0, "preview.1").equals(Version.from(0, 20, 0, "preview.2")));
        assertFalse(Version.from(0, 20, 0).equals(null));
    }