@Test
public void createCategoryTest() throws Exception {

    final String name = "createdcategory_updatetest";
    CategoryUpdateResponse ret = updateCategoryController.exec(null, name);
    assertEquals(1, ret.getOperations().size());
    assertTrue(ret.getOperations().contains(Operation.added));
    // Checks that the category has correctly been saved using JPA
    MetadataCategory category = categoryRepository.findOneByName(name);
    assertTrue(category != null);
}