Fix addParameters utility method

Code to add a url parameter was not handling the case were there was an existing parameter already added.
Enabling the new Java unit tests and adding mock test data.