Organization organization = getOrganization();
List<Category> categories = categoryService.getAll();
assertTrue(categories.size() == 0);
CategoryForm categoryForm = new CategoryForm();
categoryForm.setName("Test Category");
categoryForm.setDescription("Test Description");
categoryForm.setEditing(false);
categoryForm.setOrganizationId(organization.getId());
categoryForm.setStorageConfigurationId(organization.getStorageConfigurations().get(0).getId());
Category category = categoryService.saveCategory(categoryForm);
categories = categoryService.getAll();
assertTrue(categories.size() == 1);
assertTrue(category.getName().equals("Test Category"));
categoryForm.setName("Test Category 2");
categoryForm.setId(category.getId());
categoryService.updateCategory(categoryForm);
categories = categoryService.getAll();
assertTrue(categories.size() == 1);
assertTrue(category.getName().equals("Test Category 2"));
}