@Test
public void updateProduct() {

    // Initialize the database
    productRepository.save(product);
    int databaseSizeBeforeCreate = productRepository.findAll().size();
    product.setName(DEFAULT_NAME);
    given()
            .contentType(JSON)
            .body(product)
            .when().put("/api/products")
            .then()
            .statusCode(200)
            .contentType(JSON)
            .body("name", equalTo(DEFAULT_NAME));
    // Validate the Product in the database
    List<Product> productList = productRepository.findAll();
    Assertions.assertEquals(productList.size(), databaseSizeBeforeCreate);
}