The attached patch removes the commented return in the testcase (there was only one occurrence of this).
The Parameter class, while a simple wrapper on Map, given its generic method simplifies access to parameter values significantly, making the code cleaner, for example:
String doAs = params.get(DoAsParam.NAME, DoAsParam.class);
String doAs = ((DoAsParam.class)map.get(DoAsParam.NAME, DoAsParam.class)).value();
And it also removes access to all the Map API which are not relevant for this use (if we use Map we'd had to wrap it in an unmodifiable MAP to avoid).
Regarding Using Guava ImmutableMap.of(), I'm getting similar warnings.
Finally, regarding sharing Param code with webhdfs. The idea is, once that webhdfs and httpfs are 100% equivalent from a functional perspective (
HDFS-3113 & HDFS-3509 would achieve that), then we can tackle unify the code (HDFS-2645).