String nodeId = "localhost:45454";
String gatewayPath = driver.getUrl( "RESOURCEMANAGER" ) + path;
String gatewayPathQuery = driver.isUseGateway() ? "" : "?user.name=" + username;
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 += "&";
}
gatewayPathQuery += param.getKey() + "=" + param.getValue();
}
}
mockRequestMatcher.respond()
.status( HttpStatus.SC_OK )
.content( driver.getResourceBytes( nodesResource + (contentType == ContentType.JSON ? ".json" : ".xml" ) ) )
.contentType( contentType.toString() );
String encryptedNodeId = given()