@isTest public with sharing class testAutomaticallyBringData { public HTTPResponse testAutomaticallyBringData(HTTPRequest req){ HttpResponse res =new HttpResponse(); res.setHeader('Content-Type', 'application/json'); String body ='[{"RecordCount":1,"Record":[{"ModelForSales":"A60102A","MCompany":"奥林巴斯","MBCGHQDeliveryStartDate":null,"MaterialStatus":[{"Value":"Active"},{"Value":"Active"}],"MaterialNumber":"A06A60102AZ2","MaterialGroup":null,"MaterialDescription":[{"LanguageKey":"Z9","Description":"A60102A"},{"LanguageKey":"ZH","Description":"A60102A : 手柄"}]}],"InterfaceNumber":"0000021234"}]'; res.setBody(body); res.setStatusCode(200); res.setStatus('OK'); return res; } }