fixed unit test problems, and made unit test open server.