@Test
public void testParseLegacy()
{

    assertEquals(JavaVersion.parse("1.8"), new JavaVersion(8, 0));
    assertEquals(JavaVersion.parse("1.8.0"), new JavaVersion(8, 0));
    assertEquals(JavaVersion.parse("1.8.0_5"), new JavaVersion(8, 0, OptionalInt.of(5)));
    assertEquals(JavaVersion.parse("1.8.0_20"), new JavaVersion(8, 0, OptionalInt.of(20)));
    assertEquals(JavaVersion.parse("1.8.1_25"), new JavaVersion(8, 1, OptionalInt.of(25)));
    assertEquals(JavaVersion.parse("1.8.0_60-ea"), new JavaVersion(8, 0, OptionalInt.of(60)));
    assertEquals(JavaVersion.parse("1.8.0_131-foo-bar-baz-qux"), new JavaVersion(8, 0, OptionalInt.of(131)));
}