added test for param setting, and fixed pageSize initialization #389