Fix unit test.

Refactor how parameter is passed in the PageFactory to simplify implementation.