Merge changes I2526f4bc,Iafe4a46d

* changes:
  Allow Handler synchronization in test code
  Remove testing code from ModuleRegistry