class CustomerServiceProxy implements CustomerService {

  @Override
  public void verifyCustomerCustomerId(String customerId) {
    Assert.notNull(customerServiceUrl, "Should not be null: " + customerServiceUrl);
    ResponseEntity<Customer> result = null;
    try {
      result = restTemplate.getForEntity(customerServiceUrl, Customer.class, customerId);
    } catch (HttpClientErrorException e) {
      switch (e.getStatusCode()) {
        case NOT_FOUND:
          throw new CustomerNotFoundException();
        default:
          unrecognizedStatusCode(customerId, e.getStatusCode());
      }
    }
    switch (result.getStatusCode()) {
      case OK:
        return;
      case NOT_FOUND:
        throw new CustomerNotFoundException();
      default:
        unrecognizedStatusCode(customerId, result.getStatusCode());
    }
  }

  @Inject public  CustomerServiceProxy(RestTemplate restTemplate);

}