Fix errors in unit test.