Added tests for message handlers.