@isTest private class AWSServiceToolTest { static testMethod void testMethod1() { TestDataUtility.CreatePIPolicyConfiguration(); Account acc = TestDataUtility.CreateAccounts(1)[0]; Map accMap = new Map(); accMap.put('Account',acc); accMap.put('object','vjdoneqvds'); String mapJson = JSON.serialize(accMap); Test.setMock(HttpCalloutMock.class, new TestDataUtility.BaseHttpMock(mapJson,'OK','200')); AWS_Integration_Info__mdt awsConfiguration = [SELECT App_Id__c,Token_URL__c,App_Secret__c,Host_URL__c FROM AWS_Integration_Info__mdt WHERE DeveloperName = 'AWS_Default_Configuration']; PIHelper.getPIIntegrationInfo('Document'); Test.startTest(); AWSServiceTool.getAWSServiceStatus(); AWSServiceTool.getAWSToken(); Set dataids = new Set(); String data = '12345678'; dataids.add(data); Test.setMock(HttpCalloutMock.class, new TestDataUtility.BaseHttpMock(mapJson,'0','200')); AWSServiceTool.deleteFileAddress(dataids); Test.stopTest(); } /*static testMethod void testMethod2() { // TestDataUtility.CreatePIPolicyConfiguration(); Account acc = TestDataUtility.CreateAccounts(1)[0]; Map accMap = new Map(); accMap.put('Account',acc); accMap.put('object','vjdoneqvds'); String mapJson = JSON.serialize(accMap); Test.setMock(HttpCalloutMock.class, new TestDataUtility.BaseHttpMock(mapJson,'OK','200')); Test.startTest(); AWSServiceTool.getAWSToken(); Test.stopTest(); }*/ static testMethod void testMethod3() { String searchContactName = 'test'; String accountId = '0010l00001PQFkhAAH'; Test.startTest(); AWSServiceTool.getNoPIContact(searchContactName,accountId); Test.stopTest(); } }