@Test
public void createProductWithExistingId() {

    int databaseSizeBeforeCreate = productRepository.findAll().size();
    product.setId(10L);
    given()
            .contentType(JSON)
            .body(product)
            .when().post("/api/products")
            .then()
            .statusCode(400);
    // Validate the Product in the database
    List<Product> productList = productRepository.findAll();
    Assertions.assertEquals(productList.size(), databaseSizeBeforeCreate);
}