@Test
public void updateCategoryTest() throws Exception {

    final String categoryName = "updatecategorytest_renamed";
    CategoryUpdateResponse ret = updateCategoryController.exec(1, categoryName);
    assertEquals(1, ret.getOperations().size());
    assertTrue(ret.getOperations().contains(Operation.updated));
    // Checks that the category has correctly been saved using JPA
    MetadataCategory category = categoryRepository.findOne(1);
    assertTrue(category.getName().equals(categoryName));
}