@Test
public void updateCategory() {

    // Initialize the database
    categoryRepository.save(category);
    int databaseSizeBeforeCreate = categoryRepository.findAll().size();
    category.setName(DEFAULT_NAME);
    given()
            .contentType(JSON)
            .body(category)
            .when().put("/api/categories")
            .then()
            .statusCode(200)
            .contentType(JSON)
            .body("name", equalTo(DEFAULT_NAME));
    // Validate the Category in the database
    List<Category> categoryList = categoryRepository.findAll();
    Assertions.assertEquals(categoryList.size(), databaseSizeBeforeCreate);
}