fixed the mocking to fully test the controller invocation