Wrote tests for the hasParameter() methods and fixed bugs uncovered by them.