Index: /trunk/psLib/test/collections/tst_psHash01.c
===================================================================
--- /trunk/psLib/test/collections/tst_psHash01.c	(revision 2619)
+++ /trunk/psLib/test/collections/tst_psHash01.c	(revision 2620)
@@ -3,4 +3,5 @@
  *****************************************************************************/
 #include <stdio.h>
+#include <string.h>
 #include "pslib.h"
 #include "psTest.h"
@@ -38,26 +39,104 @@
     psS32 currentId = psMemGetId();
     ID* id = NULL;
+    ID* replaceId = NULL;
     psS32 memLeaks        = 0;
+    psBool  retVal = false;
 
-    printPositiveTestHeader(stdout,
-                            "psHash functions",
-                            "psHashFree()");
+    // Allocate memory for Hash Table
+    printPositiveTestHeader(stdout,"psHash functions","psHashAlloc");
+    myHashTable = psHashAlloc(NUM_HASH_TABLE_BUCKETS);
+    if(myHashTable == NULL) {
+        psError(PS_ERR_UNKNOWN,true,"Unable to allocate psHash table");
+        return 10;
+    }
+    printFooter(stdout,"psHash functions","psHashAlloc",true);
 
-    myHashTable = psHashAlloc(NUM_HASH_TABLE_BUCKETS);
+    // Add items to Hash table
     id = IdAlloc("IDA");
-    psHashAdd(myHashTable, "ENTRY00", id);
+    printPositiveTestHeader(stdout,"psHash functions","psHashAdd");
+    retVal = psHashAdd(myHashTable, "ENTRY00", id);
     psFree(id);
+    if( !retVal) {
+        psError(PS_ERR_UNKNOWN, true, "psHashAdd unable to add ENTRY00");
+        return 1;
+    }
+
     id = IdAlloc("IDB");
-    psHashAdd(myHashTable, "ENTRY01", id);
+    retVal = psHashAdd(myHashTable, "ENTRY01", id);
     psFree(id);
+    if (!retVal) {
+        psError(PS_ERR_UNKNOWN, true, "psHashAdd unable to add ENTRY01");
+        return 2;
+    }
+
     id = IdAlloc("IDC");
-    psHashAdd(myHashTable, "ENTRY02", id);
+    retVal = psHashAdd(myHashTable, "ENTRY02", id);
     psFree(id);
+    if(!retVal) {
+        psError(PS_ERR_UNKNOWN,true,"psHashAdd unable to add ENTRY02");
+        return 3;
+    }
+
     id = IdAlloc("IDD");
-    psHashAdd(myHashTable, "ENTRY03", id);
+    retVal =psHashAdd(myHashTable, "ENTRY03", id);
     psFree(id);
+    if(!retVal) {
+        psError(PS_ERR_UNKNOWN,true,"psHashAdd unable to add ENTRY03");
+        return 4;
+    }
+    printFooter(stdout,"psHash functions","psHashAdd",true);
+
+    // Replace item with same key
+    printPositiveTestHeader(stdout,"psHash replace item","psHashAdd");
+    id = IdAlloc("IDE");
+    retVal = psHashAdd(myHashTable,"ENTRY02",id);
+    if(!retVal) {
+        psError(PS_ERR_UNKNOWN,true,"psHashAdd unable to replace ENTRY02");
+        return 5;
+    }
+    replaceId = psHashLookup(myHashTable,"ENTRY02");
+    if(strcmp(replaceId->name,"IDE") != 0) {
+        psError(PS_ERR_UNKNOWN,true,"psHashAdd did not replace ENTRY02 with correct item");
+        return 6;
+    }
+    printFooter(stdout,"psHash replace item","psHashAdd",true);
+
+    // Add with NULL hash table specified
+    printNegativeTestHeader(stdout,"psHashAdd","NULL hash table","Hash table can not be NULL.",0);
+    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message: psHashAdd with null table");
+    retVal = psHashAdd(NULL,"ENTRY04",id);
+    if(retVal) {
+        psError(PS_ERR_UNKNOWN,true,"psHashAdd added entry to NULL hash table.");
+        return 20;
+    }
+    printFooter(stdout,"psHashAdd","NULL hash table",true);
+
+    // Add with key to valid hash table NULL
+    printNegativeTestHeader(stdout,"psHashAdd","NULL key","Hash key can not be NULL.",0);
+    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message: psHashAdd with null key");
+    retVal = psHashAdd(myHashTable,NULL,id);
+    if(retVal) {
+        psError(PS_ERR_UNKNOWN,true,"psHashAdd added entry to hash table with NULL key.");
+        return 21;
+    }
+    printFooter(stdout,"psHashAdd","NULL hash key",true);
+
+    // Add NULL hash data to valid table and key
+    printNegativeTestHeader(stdout,"psHashAdd","NULL hash data","Hash data can not be NULL.",0);
+    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message: psHashAdd with null data");
+    retVal = psHashAdd(myHashTable,"ENTRY04",NULL);
+    if(retVal) {
+        psError(PS_ERR_UNKNOWN,true,"psHashAdd added entry to hash table with NULL data.");
+        return 22;
+    }
+    printFooter(stdout,"psHashAdd","NULL hash data",true);
+
+    // Free hash table
+    printPositiveTestHeader(stdout,"psHash functions","psHashFree");
+    psFree(id);
+
     psFree(myHashTable);
 
-    if (imGlobal != 4) {
+    if (imGlobal != 5) {
         fprintf(stderr, "%s: only (%d/4) entries were freed",
                 __func__, imGlobal);
@@ -65,11 +144,8 @@
     }
 
-    printFooter(stdout,
-                "psHash functions",
-                "psHashFree()",
-                testStatus);
+    printFooter(stdout,"psHash functions","psHashFree()",testStatus);
 
     memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
-    if (0 != memLeaks) {
+    if (memLeaks != 0) {
         psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
     }
Index: /trunk/psLib/test/collections/verified/tst_psHash01.stderr
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psHash01.stderr	(revision 2619)
+++ /trunk/psLib/test/collections/verified/tst_psHash01.stderr	(revision 2620)
@@ -0,0 +1,12 @@
+<DATE><TIME>|<HOST>|I|main
+    Following should generate an error message: psHashAdd with null table
+<DATE><TIME>|<HOST>|E|psHashAdd (psHash.c:<LINENO>)
+    Input psHash can not be NULL.
+<DATE><TIME>|<HOST>|I|main
+    Following should generate an error message: psHashAdd with null key
+<DATE><TIME>|<HOST>|E|psHashAdd (psHash.c:<LINENO>)
+    Input key can not be NULL.
+<DATE><TIME>|<HOST>|I|main
+    Following should generate an error message: psHashAdd with null data
+<DATE><TIME>|<HOST>|E|psHashAdd (psHash.c:<LINENO>)
+    Input data can not be NULL.
Index: /trunk/psLib/test/collections/verified/tst_psHash01.stdout
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psHash01.stdout	(revision 2619)
+++ /trunk/psLib/test/collections/verified/tst_psHash01.stdout	(revision 2620)
@@ -1,5 +1,65 @@
 /***************************** TESTPOINT ******************************************\
 *             TestFile: tst_psHash01.c                                             *
-*            TestPoint: psHash functions{psHashFree()}                             *
+*            TestPoint: psHash functions{psHashAlloc}                              *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+
+---> TESTPOINT PASSED (psHash functions{psHashAlloc} | tst_psHash01.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psHash01.c                                             *
+*            TestPoint: psHash functions{psHashAdd}                                *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+
+---> TESTPOINT PASSED (psHash functions{psHashAdd} | tst_psHash01.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psHash01.c                                             *
+*            TestPoint: psHash replace item{psHashAdd}                             *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+
+---> TESTPOINT PASSED (psHash replace item{psHashAdd} | tst_psHash01.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psHash01.c                                             *
+*            TestPoint: psHashAdd{NULL hash table}                                 *
+*             TestType: Negative                                                   *
+*    ExpectedErrorText: Hash table can not be NULL.                                *
+*  ExpectedStatusValue: 0                                                          *
+\**********************************************************************************/
+
+
+---> TESTPOINT PASSED (psHashAdd{NULL hash table} | tst_psHash01.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psHash01.c                                             *
+*            TestPoint: psHashAdd{NULL key}                                        *
+*             TestType: Negative                                                   *
+*    ExpectedErrorText: Hash key can not be NULL.                                  *
+*  ExpectedStatusValue: 0                                                          *
+\**********************************************************************************/
+
+
+---> TESTPOINT PASSED (psHashAdd{NULL hash key} | tst_psHash01.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psHash01.c                                             *
+*            TestPoint: psHashAdd{NULL hash data}                                  *
+*             TestType: Negative                                                   *
+*    ExpectedErrorText: Hash data can not be NULL.                                 *
+*  ExpectedStatusValue: 0                                                          *
+\**********************************************************************************/
+
+
+---> TESTPOINT PASSED (psHashAdd{NULL hash data} | tst_psHash01.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psHash01.c                                             *
+*            TestPoint: psHash functions{psHashFree}                               *
 *             TestType: Positive                                                   *
 \**********************************************************************************/
