MockRequestMatcher mockRequestMatcher = driver.getMock( "RESOURCEMANAGER" ).expect().method( "GET" )
.pathInfo( path ).queryParam( "user.name", username );
if ( params != null ) {
for (Entry<String, String> param : params.entrySet()) {
mockRequestMatcher.queryParam( param.getKey(), param.getValue() );
if (gatewayPathQuery.isEmpty()) {
gatewayPathQuery += "?";
} else {
gatewayPathQuery += "&";
}