import groovy.json. JsonSlurper
def slurper = new JsonSlurper()
def jsonReq = slurper.parseText(mockRequest.getRequestContent())
mockResponse.setResponseContent("{\"proxyRecordId\":\"pri_"+jsonReq.principal+"\" }")
Result: about 3%~15%result has problem (90000request by 2 minutes)
Analysis:
From the network capture with wireshark, sometimes, one duplicate response is for two requests. But different request must have different response as the script above.
please see the snapshot of with unwanted response.