Improve unit test about mock generator.