@Test
public void compareTo() {

    Version[] versions = new Version[] { Version.of("4.2.3-q"), Version.of("2.2.3-q"), Version.of("2.2.2-q"),
            Version.of("2.2.2-q"), Version.of("2.1.2-q"), Version.of("2.1.1-q"), Version.of("0.0.0-b"),
            Version.of("0.0.0-a"), Version.of("0.0.0") };
    Arrays.sort(versions);
    Assert.assertArrayEquals(new Version[] { Version.of("0.0.0"), Version.of("0.0.0-a"), Version.of("0.0.0-b"),
            Version.of("2.1.1-q"), Version.of("2.1.2-q"), Version.of("2.2.2-q"), Version.of("2.2.2-q"),
            Version.of("2.2.3-q"), Version.of("4.2.3-q") }, versions);
}