I\'m working on a legacy code and trying to use tests to cover the code for later refactoring. In one controller there\'s a piece of code like this: