Refactoring tests out of controller into LayerProcessor