public function testCategoryServiceReturnsNotFoundCategoryWhenCategoryNameIsNotFound()
 {
     $repository = $this->getMockBuilder(ObjectRepository::class)->getMock();
     $repository->expects(self::once())->method('findOneBy')->willThrowException(new \Exception());
     $service = new CategoryService($repository);
     $category = $service->getCategoryByName('unknown category');
     self::assertEquals(CategoryService::CATEGORY_NOT_FOUND, $category->getName());
 }