@Test
public void testParseVersion() {

	Assert.assertNull( Version.parseVersion( "v1" ));
	Assert.assertNull( Version.parseVersion( "3.1." ));
	Assert.assertNull( Version.parseVersion( "3.t.4" ));
	Assert.assertNull( Version.parseVersion( "3-1-4" ));
	Version v = Version.parseVersion( "5.10.9" );
	Assert.assertEquals( 5, v.getMajor());
	Assert.assertEquals( 10, v.getMinor());
	Assert.assertEquals( 9, v.getPatch());
	Assert.assertNull( v.getQualifier());
	v = Version.parseVersion( "71.1.0.snapshot" );
	Assert.assertEquals( 71, v.getMajor());
	Assert.assertEquals( 1, v.getMinor());
	Assert.assertEquals( 0, v.getPatch());
	Assert.assertEquals( "snapshot", v.getQualifier());
	v = Version.parseVersion( "4.7.84-SNAPSHOT" );
	Assert.assertEquals( 4, v.getMajor());
	Assert.assertEquals( 7, v.getMinor());
	Assert.assertEquals( 84, v.getPatch());
	Assert.assertEquals( "SNAPSHOT", v.getQualifier());
	v = Version.parseVersion( "3.11" );
	Assert.assertEquals( 3, v.getMajor());
	Assert.assertEquals( 11, v.getMinor());
	Assert.assertEquals( 0, v.getPatch());
	Assert.assertNull( v.getQualifier());
	v = Version.parseVersion( "8.4-SNAPSHOT" );
	Assert.assertEquals( 8, v.getMajor());
	Assert.assertEquals( 4, v.getMinor());
	Assert.assertEquals( 0, v.getPatch());
	Assert.assertEquals( "SNAPSHOT", v.getQualifier());
	v = Version.parseVersion( "4.7.84.SNAP-SHOT" );
	Assert.assertEquals( 4, v.getMajor());
	Assert.assertEquals( 7, v.getMinor());
	Assert.assertEquals( 84, v.getPatch());
	Assert.assertEquals( "SNAP-SHOT", v.getQualifier());
	v = Version.parseVersion( "4.7.84.SNAP.SHOT" );
	Assert.assertEquals( 4, v.getMajor());
	Assert.assertEquals( 7, v.getMinor());
	Assert.assertEquals( 84, v.getPatch());
	Assert.assertEquals( "SNAP.SHOT", v.getQualifier());
	v = Version.parseVersion( "4.7.SNAP.SHOT" );
	Assert.assertEquals( 4, v.getMajor());
	Assert.assertEquals( 7, v.getMinor());
	Assert.assertEquals( 0, v.getPatch());
	Assert.assertEquals( "SNAP.SHOT", v.getQualifier());
}