public <T> T findOne(URI uri, Class<T> targetClass) {
   Assert.state(uri != null, "uri must be set to use this method");
   try {
     return restOperations.getForObject(uri, targetClass);
     // TODO check this exception translation and centralize.
   } catch (HttpClientErrorException clientError) {
     if (clientError.getStatusCode() == HttpStatus.NOT_FOUND) {
       throw new DocumentRetrievalFailureException(uri.getPath());
     }
     throw new CouchUsageException(clientError);
   } catch (HttpServerErrorException serverError) {
     throw new CouchServerResourceUsageException(serverError);
   } catch (RestClientException otherError) {
     throw new UncategorizedCouchDataAccessException(otherError);
   }
 }