URIcompliance { static String extractVersion(URI objURI) { String URIstr = objURI.toString(); Matcher m = genericURIpattern1Pat.matcher(URIstr); if (m.matches() && m.groupCount()>=6) return m.group(6); else return null; }    }
@Test public void testExtractVersion1() { String extractedVersion = extractVersion(uri4); assertNull(extractedVersion); }
@Test public void testExtractVersion2() { String extractedVersion = extractVersion(uri6); assertNull(extractedVersion); }
@Test public void testExtractVersion3() { String extractedVersion = extractVersion(uri8); assertNull(extractedVersion); }
@Test public void testExtractVersion4() { String extractedVersion = extractVersion(uri9); assertNull(extractedVersion); }
@Test public void testExtractVersion5() { String extractedVersion = extractVersion(uri1); assertEquals("1.0", extractedVersion); }
@Test public void testExtractVersion6() { String extractedVersion = extractVersion(uri5); assertEquals("1.0.1-alpha", extractedVersion); }
@Test public void testExtractVersion7() { String extractedVersion = extractVersion(uri7); assertEquals("1.0.1-beta", extractedVersion); }
@Test public void testExtractVersion8() { String extractedVersion = extractVersion(uri10); assertEquals("1.0.02-SNAPSHOT", extractedVersion); }