Updated tests to mirror what happens in the controller. The controller and tests now use the same code but behave different.