@isTest global class NFM402HttpCallMock implements HttpCalloutMock { // 实现这个接口方法 global HTTPResponse respond(HTTPRequest request) { // 创建一个假的回应 HttpResponse response = new HttpResponse(); response.setHeader('Content-Type', 'application/json'); // response.setBody('{"code":0,"data":[{"SYSTEM_SOURCE_REF_NO":"a0J1000000LmVQU","ETQ_UPLOAD_STATUS":"200","ETQ_COMPLAINT_NUMBER":"111111"},{"SYSTEM_SOURCE_REF_NO":"a0J1000000LmVQU","ETQ_UPLOAD_STATUS":"200","ETQ_COMPLAINT_NUMBER":"222222"}],"msg":"执行成功"}'); response.setBody('{"code":0,"data":[{"SYSTEM_SOURCE_REF_NO":"a0J1000000LmVQU","ETQ_UPLOAD_STATUS":"200","ETQ_COMPLAINT_NUMBER":"111111","INTERFACE_RECORD_ID":121},{"SYSTEM_SOURCE_REF_NO":"a0J1000000LmVQU","ETQ_UPLOAD_STATUS":"200","ETQ_COMPLAINT_NUMBER":"222222"}],"msg":"执行成功"}'); response.setStatusCode(200); return response; } }