Salesforce CollaborationGroup sObject in Apex Unit Tests

The below Test Class Code will occur [System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE] error if a same CollaborationGroup was existed,even Test Class dose not have the @IsTest(SeeAllData=true) annotation. As the document of Salesforce CollaborationGroup API [SOAP API Developer’s Guide],the Name of CollaborationGroup must be unique across public and private groups. […]

read more