Well it depends on how often the class is used throughout the code. You'll likely want to create an IAuthenticationManager
interface that includes methods that match the static methods you want to replace with instance methods. Then you could create an AuthenticationManager
class that implements the interface, and accepts the UserController
dependency via its constructor.
You would then need to replace all the static method call-sites the instance methods. You would probably want to inject an IAuthenticationManager
into the classes via a constructor or a property. If need-be, you could also pass an IAuthenticationManager
to the methods (at the call-sites) as a parameter.
Unfortunately replacing static methods takes quite a bit of refactoring. It is worth the effort though. It opens up the door for unit-testing.
Keep in mind that you can always refactor one method at a time by extracting an interface for one of the static methods. Do each method one at a time to take a step-wise approach to your refactoring (in other words, each method gets its own interface).
I would recommend taking a look at this book if you can: Working Effectively With Legacy Code. Great book that covers all sort of situation like this one.