Resolve controller dependency, fix unit tests