Correct namespace used when generating test cases.

Fixes #3912