Index: test/edu/ucsb/nceas/metacat/dataone/CrudServiceTest.java
===================================================================
--- test/edu/ucsb/nceas/metacat/dataone/CrudServiceTest.java	(revision 5339)
+++ test/edu/ucsb/nceas/metacat/dataone/CrudServiceTest.java	(revision 5340)
@@ -50,16 +50,17 @@
  * A JUnit test for testing the dataone CrudService class
  */
 public class CrudServiceTest extends MCTestCase 
-{
-  /**
-   * consstructor for the test
-   */
-  public CrudServiceTest(String name)
-  {
-    super(name);
-  }
+{   
+    /**
+    * consstructor for the test
+    */
+    public CrudServiceTest(String name)
+    {
+        super(name);
+        init();
+    }
   
-  /**
+    /**
 	 * Establish a testing framework by initializing appropriate objects
 	 */
 	public void setUp() throws Exception 
@@ -73,6 +74,19 @@
 	public void tearDown() 
 	{
 	}
+	
+	public void init()
+	{
+	    try
+	    {
+            
+        }
+        catch(Exception e)
+        {
+            e.printStackTrace();
+            fail("Could not initialize CrudServiceTest: " + e.getMessage());
+        }
+	}
 
 	/**
 	 * Create a suite of tests to be run together
@@ -82,12 +96,11 @@
 		TestSuite suite = new TestSuite();
 		suite.addTest(new CrudServiceTest("initialize"));
 		suite.addTest(new CrudServiceTest("testSingletonAccessor"));
-		suite.addTest(new CrudServiceTest("testCreate"));
+		suite.addTest(new CrudServiceTest("testCreateAndGet"));
 		//suite.addTest(new CrudServiceTest(""));
 		//suite.addTest(new CrudServiceTest(""));
 		//suite.addTest(new CrudServiceTest(""));
 		//suite.addTest(new CrudServiceTest(""));
-		//suite.addTest(new CrudServiceTest(""));
 		return suite;
 	}
 	
@@ -95,43 +108,49 @@
 	 * create(AuthToken token, Identifier guid, InputStream object, SystemMetadata sysmeta) 
      *   throws InvalidToken, ServiceFailure, NotAuthorized, IdentifierNotUnique, UnsupportedType, 
      *       InsufficientResources, InvalidSystemMetadata, NotImplemented
+     *
+     * public InputStream get(AuthToken token, Identifier guid)
+     *       throws InvalidToken, ServiceFailure, NotAuthorized, NotFound, 
+     *       NotImplemented
 	 */
-	public void testCreate()
+	public void testCreateAndGet()
 	{
 	    try
 	    {
+	        Identifier id;
+            String testDoc;
+            AuthToken token;
+	        testDoc = "<?xml version=\"1.0\"?><test></test>\n";
+            
             CrudService cs = CrudService.getInstance();
-            
             //login and get a sessionid
             System.out.println("creating MetacatRestClient with url " + cs.getContextUrl());
             MetacatRestClient restClient = new MetacatRestClient(cs.getContextUrl());
             String username = PropertyService.getProperty("test.mcUser");
-			String password = PropertyService.getProperty("test.mcPassword");
-			System.out.println("logging in with username: " + username + " and password " + password + " to context " + cs.getContextUrl());
-			String response = restClient.login(username, password);
-			//System.out.println("response to login: " + response);
-			String sessionid = restClient.getSessionId();
-			SessionService sessionService = SessionService.getInstance();
-			sessionService.registerSession(new SessionData(sessionid, username, new String[0], password, "CrudServiceLogin"));
-			System.out.println("sessionid: " + sessionid);
-			AuthToken token = new AuthToken(sessionid);
-			
-            String s = "<?xml version=\"1.0\"?><test></test>\n";
+            String password = PropertyService.getProperty("test.mcPassword");
+            System.out.println("logging in with username: " + username + " and password " + password + " to context " + cs.getContextUrl());
+            String response = restClient.login(username, password);
+            //System.out.println("response to login: " + response);
+            String sessionid = restClient.getSessionId();
+            SessionService sessionService = SessionService.getInstance();
+            sessionService.registerSession(new SessionData(sessionid, username, new String[0], password, "CrudServiceLogin"));
+            System.out.println("sessionid: " + sessionid);
+            token = new AuthToken(sessionid);
             
-            //create the system metadata then run the create method
-            StringBufferInputStream sbis = new StringBufferInputStream(s);
+            id = new Identifier();
             String docid = generateDocumentId();
-            String smdocid = generateDocumentId();
-            Identifier id = new Identifier();
             id.setValue(docid);
+	                    
+            //create the system metadata then run the create method
+            StringBufferInputStream sbis = new StringBufferInputStream(testDoc);
             SystemMetadata sm = new SystemMetadata();
             //set the id
             sm.setIdentifier(id);
-            System.out.println("sm id is " + id);
+            System.out.println("sm id is " + id.getValue());
             sm.setObjectFormat(ObjectFormat.convert("eml://ecoinformatics.org/eml-2.1.0"));
             System.out.println("sm objectformat: " + sm.getObjectFormat());
             //create the checksum
-            String checksumS = checksum(s);
+            String checksumS = checksum(testDoc);
             ChecksumAlgorithm ca = ChecksumAlgorithm.convert("MD5");
             Checksum checksum = new Checksum();
             checksum.setValue(checksumS);
@@ -139,8 +158,8 @@
             sm.setChecksum(checksum);
             System.out.println("sm checksum is " + checksumS);
             //set the size
-            sm.setSize(s.getBytes().length);
-            System.out.println("sm size: " + s.getBytes().length);
+            sm.setSize(testDoc.getBytes().length);
+            System.out.println("sm size: " + testDoc.getBytes().length);
             //submitter
             Principal p = new Principal();
             p.setValue("joe");
@@ -152,9 +171,23 @@
             nr.setValue("metacat");
             sm.setOriginMemberNode(nr);
             sm.setAuthoritativeMemberNode(nr);
+            //create the doc
+            cs.create(token, id, sbis, sm);
             
+            //try to get the same doc then compare them
+            InputStream gotDocStream = cs.get(token, id);
+            StringBuffer sb = new StringBuffer();
+            byte[] b = new byte[1024];
+            int numread = gotDocStream.read(b, 0, 1024);
+            while(numread != -1)
+            {
+                sb.append(new String(b, 0, numread));
+                numread = gotDocStream.read(b, 0, 1024);
+            }
             
-            cs.create(token, id, sbis, sm);
+            String gotDoc = sb.toString();
+            System.out.println("got doc: " + gotDoc);
+            assertTrue(gotDoc.trim().equals(testDoc.trim()));
         }
         catch(Exception e)
         {
Index: src/edu/ucsb/nceas/metacat/DocumentImpl.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DocumentImpl.java	(revision 5339)
+++ src/edu/ucsb/nceas/metacat/DocumentImpl.java	(revision 5340)
@@ -3393,7 +3393,7 @@
             // Get an instance of the parser
             String parserName = PropertyService.getProperty("xml.saxparser");
             parser = XMLReaderFactory.createXMLReader(parserName);
-            XMLSchemaService.populateRegisteredSchemaList();
+            XMLSchemaService.getInstance().populateRegisteredSchemaList();
             if (ruleBase != null && ruleBase.equals(EML200)) {
                 logMetacat.info("DocumentImpl.initalizeParser - Using eml 2.0.0 parser");
                 chandler = new Eml200SAXHandler(dbconn, action, docid, rev,
@@ -3411,7 +3411,7 @@
                 // From DB to find the register external schema location
                 String externalSchemaLocation = null;
 //                SchemaLocationResolver resolver = new SchemaLocationResolver();
-                externalSchemaLocation = XMLSchemaService.getNameSpaceAndLocationString();
+                externalSchemaLocation = XMLSchemaService.getInstance().getNameSpaceAndLocationString();
                 logMetacat.debug("DocumentImpl.initalizeParser - 2.0.0 external schema location: " + externalSchemaLocation);
                 // Set external schemalocation.
                 if (externalSchemaLocation != null
@@ -3436,7 +3436,7 @@
                 parser.setFeature(SCHEMAVALIDATIONFEATURE, true);
                 // From DB to find the register external schema location
                 String externalSchemaLocation = null;
-                externalSchemaLocation = XMLSchemaService.getNameSpaceAndLocationString();
+                externalSchemaLocation = XMLSchemaService.getInstance().getNameSpaceAndLocationString();
                 logMetacat.debug("DocumentImpl.initalizeParser - 2.1.0 external schema location: " + externalSchemaLocation);
                 // Set external schemalocation.
                 if (externalSchemaLocation != null
Index: src/edu/ucsb/nceas/metacat/service/XMLSchemaService.java
===================================================================
--- src/edu/ucsb/nceas/metacat/service/XMLSchemaService.java	(revision 5339)
+++ src/edu/ucsb/nceas/metacat/service/XMLSchemaService.java	(revision 5340)
@@ -128,7 +128,7 @@
 	 * 
 	 * @return a list of XMLSchema objects holding registered schema information
 	 */
-	public static Vector<XMLSchema> getRegisteredSchemaList() {
+	public Vector<XMLSchema> getRegisteredSchemaList() {
 		return registeredSchemaList;
 	}
 	
@@ -140,7 +140,7 @@
 	 * @return a string that holds space delimited registered namespaces and
 	 *         locations.
 	 */
-	public static String getNameSpaceAndLocationString() {
+	public String getNameSpaceAndLocationString() {
 		return nameSpaceAndLocationString;
 	}
 	
@@ -150,7 +150,7 @@
 	 * 
 	 * @return a list that holds registered namespaces.
 	 */
-	public static Vector<String> getNameSpaceList() {
+	public Vector<String> getNameSpaceList() {
 		return nameSpaceList;
 	}
 	
@@ -162,7 +162,7 @@
 	 * @return true if the xml.useFullSchemaValidation property is set to true,
 	 *         false otherwise.
 	 */
-	public static boolean useFullSchemaValidation() {
+	public boolean useFullSchemaValidation() {
 		return useFullSchemaValidation;
 	}
 	
@@ -170,7 +170,7 @@
 	 * sets the UseFullSchemaValidation variable.  The only way this should be
 	 * set is in the constructor or the refresh methods.
 	 */
-	private static void setUseFullSchemaValidation() throws PropertyNotFoundException {
+	private void setUseFullSchemaValidation() throws PropertyNotFoundException {
 		String strUseFullSchemaValidation = 
 			PropertyService.getProperty("xml.useFullSchemaValidation");
 		useFullSchemaValidation = Boolean.valueOf(strUseFullSchemaValidation);
@@ -181,7 +181,7 @@
 	 * xml_catalog table and then makes sure the schema actually exists and is
 	 * readable on disk.
 	 */
-	public static void populateRegisteredSchemaList() {
+	public void populateRegisteredSchemaList() {
 		DBConnection conn = null;
 		int serialNumber = -1;
 		PreparedStatement pstmt = null;
Index: src/edu/ucsb/nceas/metacat/SchemaLocationResolver.java
===================================================================
--- src/edu/ucsb/nceas/metacat/SchemaLocationResolver.java	(revision 5339)
+++ src/edu/ucsb/nceas/metacat/SchemaLocationResolver.java	(revision 5340)
@@ -98,7 +98,7 @@
   
     // if name space is not in table
     if (nameSpace !=null && schemaLocation != null &&
-        !XMLSchemaService.getNameSpaceList().contains(nameSpace))
+        !XMLSchemaService.getInstance().getNameSpaceList().contains(nameSpace))
     {
        try
        {
@@ -113,7 +113,7 @@
         // because the schema was in the db but there was no file on disk.  If that's 
         // the case, it will show up in the name space list now.  If it doesn't we need
         // to register the schema in the database.
-        if (!XMLSchemaService.getNameSpaceList().contains(nameSpace)) {
+        if (!XMLSchemaService.getInstance().getNameSpaceList().contains(nameSpace)) {
         	registerSchema(newURLInMetacat);
         	ServiceService.refreshService("XMLSchemaService");
         }
@@ -259,7 +259,7 @@
       DBConnectionPool.returnDBConnection(conn, serialNumber);
 
     }//finally
-    XMLSchemaService.populateRegisteredSchemaList();
+    XMLSchemaService.getInstance().populateRegisteredSchemaList();
   }
   
   /*
@@ -295,7 +295,7 @@
        // Print out a empty schema list
        SchemaLocationResolver schema = new SchemaLocationResolver();
        logMetacat.warn("Namespace and Location String: "+ 
-                                XMLSchemaService.getNameSpaceAndLocationString());
+                                XMLSchemaService.getInstance().getNameSpaceAndLocationString());
        // input a schemalocation
        SchemaLocationResolver schema2 = new SchemaLocationResolver(
                                         "eml://ecoinformatics.org/eml-2.0.0 " +
@@ -309,7 +309,7 @@
        // print out new schema list in db
        SchemaLocationResolver schema4 = new SchemaLocationResolver();
        logMetacat.warn("Namespace and Location String: "+ 
-    		   XMLSchemaService.getNameSpaceAndLocationString());
+    		   XMLSchemaService.getInstance().getNameSpaceAndLocationString());
      }
      catch(Exception e)
      {
