Refactoring the check parameters to test