Fixing controller instantiation in tests