Index: test/edu/ucsb/nceas/metacattest/client/MetacatClientTest.java
===================================================================
--- test/edu/ucsb/nceas/metacattest/client/MetacatClientTest.java	(revision 5888)
+++ test/edu/ucsb/nceas/metacattest/client/MetacatClientTest.java	(revision 5889)
@@ -33,11 +33,6 @@
 import java.io.Reader;
 import java.io.StringReader;
 import java.io.StringWriter;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.SimpleTimeZone;
-import java.util.TimeZone;
 
 import edu.ucsb.nceas.MCTestCase;
 import edu.ucsb.nceas.metacat.client.DocumentNotFoundException;
@@ -48,7 +43,6 @@
 import edu.ucsb.nceas.metacat.client.MetacatFactory;
 import edu.ucsb.nceas.metacat.client.MetacatInaccessibleException;
 import edu.ucsb.nceas.metacat.properties.PropertyService;
-import edu.ucsb.nceas.utilities.FileUtil;
 import edu.ucsb.nceas.utilities.IOUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 import junit.framework.Test;
@@ -55,8 +49,6 @@
 import junit.framework.TestSuite;
 import java.io.FileInputStream;
 
-import org.apache.log4j.Logger;
-
 /**
  * A JUnit test for testing Step class processing
  */
@@ -84,7 +76,6 @@
 		}
 	}
     private String failpass = "uidfnkj43987yfdn";
-    private String prefix = "test";
     private String newdocid = null;
     private String testfile = "test/jones.204.22.xml";
     private String onlinetestdatafile = "test/onlineDataFile1";
@@ -104,7 +95,8 @@
     public MetacatClientTest(String name)
     {
         super(name);
-        newdocid = generateDocid();
+        prefix = "metacatClientTest";
+        newdocid = generateDocumentId();
     }
 
     /**
@@ -391,7 +383,7 @@
     {
         debug("\nStarting upload test...");
         try {
-            newdocid = generateDocid();
+            newdocid = generateDocumentId();
             String identifier = newdocid + ".1";
             writeIdToFile(DATAID, newdocid);
             m.login(username, password);
@@ -441,7 +433,7 @@
     {
         debug("\nStarting upload_stream test...");
         try {
-            newdocid = generateDocid();
+            newdocid = generateDocumentId();
             String identifier = newdocid + ".1";
             m.login(username, password);
             File testFile = new File(onlinetestdatafile);
@@ -637,7 +629,7 @@
         }
 
         try {
-            String identifier = generateDocid() + ".1";
+            String identifier = generateDocumentId() + ".1";
             Metacat m2 = null;
             try {
             	debug("Creating second connection and logging out of it.");
@@ -676,7 +668,7 @@
         debug("\nStarting resuseInvalidSession test...");
         String oldSessionId = "foobar";
         try {
-            String identifier = generateDocid() + ".1";
+            String identifier = generateDocumentId() + ".1";
             Metacat m3 = null;
             try {
                 m3 = MetacatFactory.createMetacatConnection(metacatUrl);
@@ -784,7 +776,7 @@
     	{
 	    	try {
 	    		Thread.sleep(20000);
-	    		newdocid = generateDocid();
+	    		newdocid = generateDocumentId();
 	            String identifier = newdocid + ".1";
 	            debug("insertSpatialDocs(): the docid is "+identifier);
 	            m.login(username, password);
@@ -817,73 +809,6 @@
     	}
     }
     
-    /**
-     * Create a hopefully unique docid for testing insert and update. Does
-     * not include the 'revision' part of the id.
-     *
-     * @return a String docid based on the current date and time
-     */
-    private String generateDocid()
-    {
-	StringBuffer docid = new StringBuffer(prefix);
-	docid.append(".");
-		     
-        // Create a calendar to get the date formatted properly
-        String[] ids = TimeZone.getAvailableIDs(-8 * 60 * 60 * 1000);
-        SimpleTimeZone pdt = new SimpleTimeZone(-8 * 60 * 60 * 1000, ids[0]);
-        pdt.setStartRule(Calendar.APRIL, 1, Calendar.SUNDAY, 2*60*60*1000);
-        pdt.setEndRule(Calendar.OCTOBER, -1, Calendar.SUNDAY, 2*60*60*1000);
-        Calendar calendar = new GregorianCalendar(pdt);
-        Date trialTime = new Date();
-        calendar.setTime(trialTime);
-
-	int time = 0; 
-	
-	docid.append(calendar.get(Calendar.YEAR));
-	
-	time = calendar.get(Calendar.DAY_OF_YEAR);
-	if(time < 10){
-		docid.append("0");
-		docid.append("0");
-		docid.append(time);
-	} else if(time < 100) {
-		docid.append("0");
-		docid.append(time);
-	} else {
-		docid.append(time);
-	}
-	
-	time = calendar.get(Calendar.HOUR_OF_DAY);
-	if(time < 10){
-		docid.append("0");
-		docid.append(time);
-	} else {
-		docid.append(time);
-	}
-	
-	time = calendar.get(Calendar.MINUTE);
-	if(time < 10){
-		docid.append("0");
-		docid.append(time);
-	} else {
-		docid.append(time);
-	}
-	
-	time = calendar.get(Calendar.SECOND);
-	if(time < 10){
-		docid.append("0");
-		docid.append(time);
-	} else {
-		docid.append(time);
-	}
-    
-	 //sometimes this number is not unique, so we append a random number
-	int random = (new Double(Math.random()*100)).intValue();
-	docid.append(random);
-	
-	return docid.toString();
-    }
-    
     /*
      * Write id to a file for persistance
      */
