added some unit test code.