1 23 package org.archive.uid; 24 25 import java.net.URI ; 26 import java.net.URISyntaxException ; 27 import java.util.HashMap ; 28 import java.util.Map ; 29 30 import junit.framework.TestCase; 31 32 36 public class UUIDGeneratorTest extends TestCase { 37 public void testQualifyRecordID() throws URISyntaxException { 38 Generator g = new UUIDGenerator(); 39 URI uri = g.getRecordID(); 40 Map <String , String > qualifiers = new HashMap <String , String >(); 41 qualifiers.put("a", "b"); 42 URI nuURI = g.qualifyRecordID(uri, qualifiers); 43 assertNotSame(uri, nuURI); 44 qualifiers.put("c", "d"); 45 nuURI = g.qualifyRecordID(nuURI, qualifiers); 46 assertNotSame(uri, nuURI); 47 } 48 } 49 | Popular Tags |