Added code for randomly generating error test cases.
Added code for testing error manager.