userdata tests

Added tests for userdata module.