@isTest private class RepeatProMergeBtachTest { @IsTest static void TestMethod01() { List NFM501GainEndTimeTransfers = new List(); BatchIF_Transfer__c transfer2 = new BatchIF_Transfer__c(); transfer2.Table__c = 'NFM501GainEndTime'; transfer2.NFM501_Gain_End_Time__c = Datetime.now(); NFM501GainEndTimeTransfers.add(transfer2); insert NFM501GainEndTimeTransfers; List NFM501TokenTransfers = new List(); BatchIF_Transfer__c transfer3 = new BatchIF_Transfer__c(); transfer3.Table__c = 'NFM501Token'; transfer3.NFM501_Token__c = null;//'eyJhbGciOiJIUzUxMiJ9.eyJhcHBLZXkiOiIwNzBmMDBiZi02NGYxLTQ3MjAtYThkOC1iYmUxYWE5NzZkMjIiLCJhcHBTZWNyZXQiOiI2N0JCMkJBRkM4QUEwQkEwQ0FCQjM3Q0JGNTBFQzI5MiIsImV4cCI6MTYyNDI2MTc1OX0.s55zh9SSpwqRdp1wXH43_wEGpwlZtMfRgl1x8t69A-N0H7QrzRNmK5MNqNGGLhQ2LL_AbMSJmDfwO5chgwndoA'; NFM501TokenTransfers.add(transfer3); insert NFM501TokenTransfers; Tender_information__c TenInfo = new Tender_information__c(); Tender_information__c TenInfo1 = new Tender_information__c(); TenInfo1.Name = 'QLMTEST08111057-02'; insert TenInfo1; TenInfo.Name = '2345'; TenInfo.InfoId__c = '1234'; TenInfo.Retain_Tender__c = TenInfo1.Id; TenInfo.RepeatProMergeFLG__c = true; insert TenInfo; List str = new List(); str.add(TenInfo.Id); Test.StartTest(); Database.executeBatch( new RepeatProMergeBtach(),1); Database.executeBatch( new RepeatProMergeBtach(true),1); Database.executeBatch( new RepeatProMergeBtach(str,true),1); Test.stopTest(); } }