final Request<EmptyRecord> createReq1 = _photoBuilders.create().input(newPhoto).build();
final ResponseFuture<EmptyRecord> createFuture1 = _restClient.sendRequest(createReq1);
// Future.getResource() blocks until server responds
final Response<EmptyRecord> createResp1 = createFuture1.getResponse();
EmptyRecord entity1 = createResp1.getEntity();
@SuppressWarnings("unchecked")
final CreateResponse<Long> entity = (CreateResponse<Long>)createResp1.getEntity();
final long newPhotoId = entity.getId();
respWriter.println("New photo ID: " + newPhotoId);