Added new functions and tests for IDGenerator