@isTest
public class NewAndEditQuotesControllerTest {
    @TestSetup
    static void makeData(){
        TestDataUtility.CreatePIPolicyConfiguration();
    }
    static testMethod void NewAndEditQuotesController() {
        Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreateMetaDataUtilityHttpMock());
        Quotes__c uf = TestDataUtility.CreateQuotes(1)[0];

        Test.startTest();
        ApexPages.StandardController con =  new ApexPages.StandardController(uf);
        NewAndEditQuotesController qis = new NewAndEditQuotesController(con);
        qis.contactId = 'Test';
        String qisJson = '{"Name":"test123","CurrencyIsoCode":"CNY","TOTAL_TRANSACTION_ITEM_WEIGHT_KGS__c":"","InvalidData__c":false,"TOTAL__c":"","VERTICAL_MARKET_SEGMENT_SO__c":"","TAX_RATE__c":"","THROW_MESSAGE__c":false,"TERMS_OVERRIDE__c":false,"STATUS__c":"","TERMS__c":"","SELECT_MESSAGE__c":"","TAX_OVERRIDE__c":false,"REVISION_NEEDED__c":"","TAX_ID__c":"","SALES_TEAM_AUTO_ASSIGN_ON_SAVE__c":false,"TAX_CODE__c":"","RATE__c":"","TAX__c":"","QUOTE_TITLE__c":"","SWO_NUMBER__c":"","PRODUCT_SEGMENT__c":"","SUBTOTAL__c":"","PROBABILITY__c":"","SHIP_VIA__c":"","PO__c":"","SHIP_TO_SELECT__c":"","PKMS_PO_FOR_RECEIPT__c":"","SHIP_TO_ENTITY_USE_CODE__c":"","ORDER_TYPE__c":"","SHIP_TO__c":"","NSN__c":"","SHIPPING_TAX_RATE__c":"","notSaveEmail__c":true,"SHIPPING_TAX_CODE__c":"","NO_CHARGE_TYPE__c":"","SHIPPING_COST__c":"","IS_SELLER_IMPORTER_OF_RECORD__c":false,"SHIPPING_CARRIER__c":"","INITIATE_APPROVAL_ROUTING__c":false,"SALES_TEAM_AUTO_ASSIGNMENT_OVERRIDE__c":false,"GSA_ORDER__c":false,"RMA_NOTES__c":"","FDA_REPORT_COMPLETE__c":false,"QuotesType__c":"","EST_EXTENDED_COST__c":"","DISCOUNT_STATUS_ROUTING__c":"","OPPORTUNITY__c":"","DISCOUNT__c":"","ONLINE_BILLING_ADDRESS__c":"","BILLING_SCHEDULE__c":"","ONLINE_BILLING__c":false,"BILL_TO_ENTITY_USE_CODE__c":"","LOCATION__c":"","CATEGORY_1_INDUSTRY_SO__c":"","LEAD_TIME__c":"","COLLECTION_STATUS__c":"","LEAD_SOURCE__c":"","INVOICE_MESSAGING__c":"","CONTRACT_NAME__c":"","INCOTERM__c":"","CURRENCY__c":"","GOVERNMENT_ORDER__c":false,"DATE__c":"","EXPIRES__c":"","DISCOUNT_ITEM__c":"","EXP_CLOSE__c":"","EST_GROSS_PROFIT_PERCENT__c":"","EST_GROSS_PROFIT__c":"","DISCOUNT_WORKFLOW_TYPE__c":"","DISCOUNT_STATUS__c":"","BILL_TO__c":"","BILL_TO_SELECT__c":"","CATEGORY_2_USE_SO__c":"","CONTACT_PHONE__c":"","CUSTOMER_MESSAGE__c":"","BILL_TO_Encrypted__c":"","SHIP_TO_Encrypted__c":"","AWS_Data_Id__c":"961999748590469121"}';
        NewAndEditQuotesController.saveQuotes(qisJson,'avgwshDFcxAS',False);
        NewAndEditQuotesController.saveQuotes(qisJson,'avgwshDFcxAS',True);
        Test.stopTest();
    }
}