private function setMockCategoriesService()
{
$mockCategoriesService = $this->getMockBuilder(CategoriesService::class)->disableOriginalConstructor()->setMethods(['getAllGroups', 'saveGroup', 'deleteGroupById'])->getMock();
$mockCategoriesService->expects($this->any())->method('getAllGroups')->with('handle')->willReturn([]);
$this->setComponent(Craft::app(), 'categories', $mockCategoriesService);
return $mockCategoriesService;
}