Fix built-in controller registration flow.
Built-in controller registration flow is wrong, breaking the use
case where more than one test class is executed in a test run.
It should follow the same flow as controller modules registered
by the test classes.
The import, registration, and unregistration should happen once for
each test class in each test run, for all controller modules.
Added a unit test for this use case as well.
2 files changed