some unit test added.
Fixed some unit tests.