Added a test for uniqueId()
Fix a bug when samplingRate == 0