Arnob Dey wrote:you may try using Map<String, String> as key-value pairs as well.
Well that sounds like a splendid idea to me. I can't think of a scenario where the parameter order is important. If your tests are dependent on parameter order, then your tests are wrong.
A succession of splits should do the trick for you.
First split on '?' to separate the URL from the parameters
Second split the parameters on '&' to get a list of 'key=val' Strings
Third split on '=' to separate the key and value from each parameter.
Put the keys and values in a Map, and you're done.