private function getMockCategoryGroup($groupId)
{
$mockCategoryGroup = $this->getMockBuilder(CategoryGroupModel::class)->disableOriginalConstructor()->getMock();
$mockCategoryGroup->expects($this->any())->method('__get')->willReturnMap([['id', $groupId], ['fieldLayoutId', $groupId], ['handle', 'groupHandle' . $groupId], ['name', 'groupName' . $groupId]]);
$mockCategoryGroup->expects($this->any())->method('getLocales')->willReturn([$this->getMockCategoryGroupLocale()]);
$mockCategoryGroup->expects($this->any())->method('getAllErrors')->willReturn(['ohnoes' => 'horrible error']);
return $mockCategoryGroup;
}