Allow for controller instances to form in all cases and fixed repository mocking in the testTrait