@Test
public void createProduct() {

    int databaseSizeBeforeCreate = productRepository.findAll().size();
    given()
            .contentType(JSON)
            .body(this.product)
            .when().post("/api/products")
            .then()
            .statusCode(201);
    // Validate the Product in the database
    List<Product> productList = productRepository.findAll();
    Assertions.assertEquals(productList.size(), databaseSizeBeforeCreate + 1);
    Product product = productList.get(productList.size() - 1);
    Assertions.assertEquals(product.getName(), DEFAULT_NAME);
}