public void testUpdate() throws Exception {
Post request1 = createCategory("Upload", "Interesting");
request1.executeAsString();
String key = parseCategoryKey(request1.getLocation());
String newName = "Interesting" + System.currentTimeMillis();
Put request2 = updateCategory(key, newName);
String result2 = request2.executeAsString();
assertEquals("category /Upload/" + newName + " updated", result2);
assertEquals(201, request2.getStatusCode());
assertTrue(request2.isSuccessful());
String newKey = parseCategoryKey(request2.getLocation());
HttpRequest request3 = readCategory(newKey);
String result3 = request3.executeAsString();
assertEquals(200, request3.getStatusCode());
assertTrue(request3.isSuccessful());
GpxType gpxType = GpxUtil.unmarshal11(result3);