PutMethod entityPutMethod = new PutMethod("http://localhost:8789/cryson/CrysonTestEntity");
entityPutMethod.setRequestEntity(new StringRequestEntity(serializedEntity, "application/json", "UTF-8"));
assertEquals(200, httpClient.executeMethod(entityPutMethod));
CrysonTestEntity testEntity = crysonSerializer.deserialize(entityPutMethod.getResponseBodyAsString(), CrysonTestEntity.class, null);
String serializedChildEntity = "{\"id\":null,\"parent_cryson_id\":" + testEntity.getId() + "}";
PutMethod childEntityPutMethod = new PutMethod("http://localhost:8789/cryson/CrysonTestChildEntity");
childEntityPutMethod.setRequestEntity(new StringRequestEntity(serializedChildEntity, "application/json", "UTF-8"));
assertEquals(200, httpClient.executeMethod(childEntityPutMethod));
}