Added unit test framework for server.

Author:yangyingchao, 2013-02-06