@isTest
private class QuoteIraiHandlerTest {
    static testMethod void test_method_01() {
        String obsap_group_id = System.Label.obsap_group_opp;
        List<GroupMember> members =  [SELECT Id, GroupId, UserOrGroupId FROM GroupMember where GroupId = :obsap_group_id];
        GroupMember member = members[0];
        User obsap_user = [SELECT Id, Name, Alias FROM User WHERE Id =: member.UserOrGroupId];

        QuoteIrai__c irai = new QuoteIrai__c();
        irai.IraiUser__c = obsap_user.Id;
        irai.QuoteIrai_Status__c = '已经委托';
        insert irai;

        Task new_task = new Task();
        new_task.Subject = 'test';
        new_task.OwnerId = obsap_user.Id;
        new_task.Description = 'test';
        new_task.ActivityDate = Date.today();
        new_task.QuoteIraiId__c = irai.Id;
        insert new_task;

        irai.QuoteIrai_Status__c = '更新完毕';
        update irai;
    }
}