finish unit test code.