Put request = prepareUpdateCategory(categoryUrl, parentUrl, name);
String result = request.executeAsString();
if (request.isUnAuthorized())
throw new UnAuthorizedException("Cannot update category to " + name, categoryUrl);
if (request.isNotFound())
throw new NotFoundException("Cannot update category to " + name, categoryUrl);
if (request.isForbidden())
throw new NotOwnerException("Cannot update category to " + name, categoryUrl);
if (!request.isSuccessful())
throw new IOException("PUT on " + categoryUrl + " with payload " + name + " not successful: " + result);
return request.getLocation();