Fixed problems in unit test.