@Override
    @Transactional
    public Product createProduct(String title, String details) {
        return this.productRepository.save(new Product(null, title, details));
    }
@Test
    void createProduct_ReturnsCreatedProduct() {
        // given
        var title = "Новый товар";
        var details = "Описание нового товара";

        doReturn(new Product(1, "Новый товар", "Описание нового товара"))
                .when(this.productRepository).save(new Product(null, "Новый товар", "Описание нового товара"));

        // when
        var result = this.service.createProduct(title, details);

        // then
        assertEquals(new Product(1, "Новый товар", "Описание нового товара"), result);

        verify(this.productRepository).save(new Product(null, "Новый товар", "Описание нового товара"));
        verifyNoMoreInteractions(this.productRepository);
    }