@isTest
private class NFM706RestTest {

    @isTest static void test_method_one(){

        NFM706Rest.GeDatas GeDatas = new NFM706Rest.GeDatas();
        NFM706Rest.GeData GeData = new NFM706Rest.GeData();
        GeDatas.GeData = new NFM706Rest.GeData[]{GeData};
        
        Datetime nowDT = Datetime.now();
        String nowStr = nowDT.format('yyyyMMddHHmm');
        GeDatas.Monitoring = new NFMUtil.Monitoring();
        GeDatas.Monitoring.MessageGroupNumber = nowStr + '01' ;

        GeData.MeetingApprovedNo = 'TEST99793';
        GeData.Num = 'MT-HB-202112-5773';
        GeData.ProcessState = 110 ;

        NFMUtil.Monitoring Monitoring = GeDatas.Monitoring;
        BatchIF_Log__c rowData = NFMUtil.saveRowData(Monitoring, 'NFM706', GeDatas.GeData);
        NFM706Rest.executefuture(rowData.id);

    }

    @isTest static void test_method_two(){

        RestRequest req = new RestRequest();
        RestResponse res = new RestResponse();

        String JsonMsg = '{"Monitoring":{"TransmissionDateTime":"202112311320","Text":"","Tag":"","Sender":"OBPM","Receiver":"SFDC","NumberOfRecord":"1","MessageType":"NFM706","MessageGroupNumber":""},"GeData":[{"MeetingApprovedNo":"TEST99793","Num":"MT-HB-202112-5773","ProcessState":110}]}';
        req.requestURI = 'services/apexrest/NFM706/execute';
        req.httpMethod = 'POST';
        req.requestBody = Blob.valueOf(JsonMsg);

        RestContext.request = req;
        RestContext.response = res;
        
        NFM706Rest.doPost();
    }
}