Fixed test expectation, and fixed buildParams function
Changed name of buildParams function argument from obj to val since it's not always an object